Skip to content

QVeris tools: rename search/execute/get_by_ids to discover/invoke/ins…#104

Merged
linfangw merged 8 commits into
mainfrom
qveris_tool_refine
Mar 12, 2026
Merged

QVeris tools: rename search/execute/get_by_ids to discover/invoke/ins…#104
linfangw merged 8 commits into
mainfrom
qveris_tool_refine

Conversation

@linfangw

Copy link
Copy Markdown
Member

…pect

Rename QVeris tools for LLM clarity (discover/invoke/inspect), add progressive error recovery, rate-limit awareness, truncation detection, legacy tool name aliases, and rolodex-based discovery_id reuse for the inspect→invoke closed-loop flow.

  • qveris_search → qveris_discover, qveris_execute → qveris_invoke, qveris_get_by_ids → qveris_inspect
  • Legacy tool names aliased in TOOL_NAME_ALIASES for backward compat
  • RolodexEntry stores discoveryId from successful invokes; inspect and invoke reuse it via resolveKnownDiscoveryId (rolodex-only source)
  • qveris_invoke returns structured error when discovery_id is missing
  • Body-level failures (success: false) now include recovery_step and attempt_number alongside exception-path failures
  • 429 responses classified as rate_limited with retry_after_seconds
  • Truncation flagged with truncated: true and hint
  • System prompt: structured 3-step error recovery, domain examples, inspect→invoke guidance with discovery_id recovery semantics
  • Updated docs, release notes, AGENTS.md template, cursor rules

…pect

Rename QVeris tools for LLM clarity (discover/invoke/inspect), add
progressive error recovery, rate-limit awareness, truncation detection,
legacy tool name aliases, and rolodex-based discovery_id reuse for the
inspect→invoke closed-loop flow.

- qveris_search → qveris_discover, qveris_execute → qveris_invoke,
  qveris_get_by_ids → qveris_inspect
- Legacy tool names aliased in TOOL_NAME_ALIASES for backward compat
- RolodexEntry stores discoveryId from successful invokes; inspect and
  invoke reuse it via resolveKnownDiscoveryId (rolodex-only source)
- qveris_invoke returns structured error when discovery_id is missing
- Body-level failures (success: false) now include recovery_step and
  attempt_number alongside exception-path failures
- 429 responses classified as rate_limited with retry_after_seconds
- Truncation flagged with truncated: true and hint
- System prompt: structured 3-step error recovery, domain examples,
  inspect→invoke guidance with discovery_id recovery semantics
- Updated docs, release notes, AGENTS.md template, cursor rules

Made-with: Cursor
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the QVeris tool integration by enhancing clarity, robustness, and efficiency. The primary goal is to improve how LLMs interact with QVeris tools through more intuitive naming conventions, comprehensive error handling, and smarter session management. These changes aim to reduce misuse, provide clearer guidance, and enable more resilient agent behavior in dynamic environments.

Highlights

  • Tool Renaming: The QVeris tools have been renamed for improved clarity and to prevent confusion for Large Language Models (LLMs): qveris_search is now qveris_discover, qveris_execute is qveris_invoke, and qveris_get_by_ids is qveris_inspect.
  • Legacy Tool Name Aliases: Backward compatibility is maintained by aliasing the old tool names to the new ones in TOOL_NAME_ALIASES.
  • Enhanced Error Recovery: The qveris_invoke tool now includes progressive error recovery, providing recovery_step (fix_params, simplify, switch_tool) and attempt_number to guide agents through structured error handling.
  • Rate-Limit Awareness: HTTP 429 responses are now classified as rate_limited errors, with retry_after_seconds parsed from the Retry-After header to inform agents when to retry.
  • Truncation Detection: Invoke responses now include truncated: true and a truncation_hint when data exceeds max_response_size, guiding agents on how to retrieve full content.
  • Rolodex-based discovery_id Reuse: The session-scoped Tool Rolodex now stores discovery_id from successful invokes, allowing qveris_inspect and subsequent qveris_invoke calls to reuse this ID for a more efficient closed-loop flow.
  • Updated System Prompt and Documentation: The system prompt has been updated with structured 3-step error recovery guidance, domain examples for tool usage, and clearer instructions for the inspect to invoke flow. All relevant documentation and release notes have been updated to reflect these changes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • README.md
    • Updated QVeris tool names from qveris_search, qveris_execute, qveris_get_by_ids to qveris_discover, qveris_invoke, qveris_inspect.
    • Revised routing decision tree guidance to reflect new tool names and the inspect to invoke flow.
    • Updated the description of the Tool Rolodex to mention discovery_id reuse.
  • docs/qverisbot-from-source.md
    • Updated Chinese documentation to reflect the new QVeris tool names (qveris_discover, qveris_invoke, qveris_inspect).
    • Revised the tool routing decision tree in Chinese to align with the new inspect and invoke flow, including discovery_id recovery.
  • docs/reference/templates/AGENTS.md
    • Updated the 'QVeris Tool Routing' section to use qveris_discover and qveris_invoke.
    • Modified instructions to note tool_id and discovery_id for future reuse via qveris_inspect.
  • release_notes/QVerisBot_2026.3.8.md
    • Added release notes for the renaming of QVeris tools to discover, invoke, and inspect.
    • Included details on the new qveris_inspect tool and its role in verifying known tool IDs.
    • Updated the description of the session-scoped tool rolodex to highlight discovery_id reuse.
    • Enhanced qveris_discover boundaries with negative examples.
    • Introduced progressive error recovery for qveris_invoke failures.
    • Added truncation detection and rate-limit awareness features.
  • src/agents/system-prompt.test.ts
    • Updated test descriptions and assertions to use the new QVeris tool names (qveris_discover, qveris_invoke, qveris_inspect).
    • Added an assertion to check for 'recover discovery_id' in the prompt when qveris_inspect is available.
    • Modified tests to reflect the updated error recovery hints in the system prompt.
  • src/agents/system-prompt.ts
    • Refactored buildQverisSection to use qveris_discover and qveris_inspect for routing guidance.
    • Expanded routing guidance with domain-specific examples for qveris_discover.
    • Detailed a 3-step progressive error recovery process for qveris_invoke failures.
    • Updated anti-patterns for qveris_discover.
    • Modified tool descriptions for qveris_discover, qveris_invoke, and qveris_inspect to reflect their new roles and requirements.
    • Updated the toolOrder array to include the new QVeris tool names.
  • src/agents/tool-catalog.ts
    • Renamed tool definitions for QVeris: qveris_search to qveris_discover, qveris_execute to qveris_invoke, and qveris_get_by_ids to qveris_inspect.
    • Updated descriptions for the renamed QVeris tools.
  • src/agents/tool-policy-shared.ts
    • Added legacy QVeris tool names (qveris_search, qveris_execute, qveris_get_by_ids) to TOOL_NAME_ALIASES for backward compatibility.
    • Updated the QVERIS_TOOLS constant to use the new tool names (qveris_discover, qveris_invoke, qveris_inspect).
  • src/agents/tool-policy.test.ts
    • Updated tests to assert the presence of new QVeris tool names (qveris_discover, qveris_invoke) in coding and messaging profiles and tool groups.
    • Added tests to verify that legacy QVeris tool names are correctly normalized to their new counterparts.
  • src/agents/tools/qveris-tools.test.ts
    • Updated error classification tests to reflect the new qveris_discover and qveris_invoke names.
    • Added a test case for classifying HTTP 429 rate-limit errors, including parsing retry-after headers.
    • Modified test setup for qveris_inspect to include headers in mock fetch responses.
    • Introduced parseRequestBody helper for inspecting mock fetch requests.
    • Renamed SAMPLE_SEARCH_RESPONSE to SAMPLE_DISCOVER_RESPONSE, SAMPLE_EXECUTE_RESPONSE to SAMPLE_INVOKE_RESPONSE, and SAMPLE_GET_BY_IDS_RESPONSE to SAMPLE_INSPECT_RESPONSE.
    • Updated tests for qveris_inspect to verify discovery_id recovery from the rolodex.
    • Added tests for qveris_invoke to ensure discovery_id reuse from the rolodex and structured error handling for missing discovery_id.
    • Included tests for qveris_invoke accepting legacy search_id and returning recovery_step on body-level failures.
    • Updated rolodex tests to record and annotate discovery_id in discover results.
  • src/agents/tools/qveris-tools.ts
    • Renamed constants from SEARCH_ to DISCOVER_ and EXECUTE_ to INVOKE_ for timeouts and limits.
    • Updated type interfaces from QverisSearchResultParam to QverisDiscoverResultParam, QverisSearchResultExamples to QverisDiscoverResultExamples, QverisSearchResultTool to QverisDiscoverResultTool, QverisSearchResponse to QverisDiscoverResponse, and QverisExecutionResponse to QverisInvocationResponse.
    • Enhanced QverisErrorResult to include rate_limited error type, retry_after_seconds, recovery_step, and attempt_number.
    • Removed comment about default enablement of QVeris if API key is present.
    • Renamed resolveSearchTimeoutSeconds to resolveDiscoverTimeoutSeconds and resolveExecuteTimeoutSeconds to resolveInvokeTimeoutSeconds.
    • Renamed resolveSearchLimit to resolveDiscoverLimit.
    • Modified classifyQverisError to handle HTTP 429 responses and parse Retry-After headers.
    • Updated classifyQverisError hint for HTTP errors to reference discovery_id.
    • Renamed makeSearchCache to makeDiscoverCache and SearchCacheEntry to DiscoverCacheEntry.
    • Introduced buildApiError to consistently format API errors, including Retry-After.
    • Renamed qverisSearch to qverisDiscover and qverisExecute to qverisInvoke.
    • Updated qverisGetByIds to use buildApiError.
    • Renamed Session Tool Rolodex comment to reflect 'invoked tools'.
    • Updated RolodexEntry and makeToolRolodex to store and retrieve discoveryId.
    • Renamed SearchResultMeta to DiscoverResultMeta and makeSearchResultTracker to makeDiscoverResultTracker.
    • Modified makeDiscoverResultTracker to handle (inspect) queries for discoveryId persistence.
    • Renamed QverisSearchSchema to QverisDiscoverSchema and QverisExecuteSchema to QverisInvokeSchema.
    • Updated descriptions and examples in QverisDiscoverSchema and QverisInvokeSchema for clarity and common mistakes.
    • Renamed QverisGetByIdsSchema to QverisInspectSchema.
    • Refactored createQverisTools to use new tool names and associated logic.
    • Implemented resolveKnownDiscoveryId to retrieve discovery_id from the rolodex.
    • Modified formatToolForModel to include discovery_id in tool metadata.
    • Updated discoverTool to use discoverCache and discoverTracker.
    • Enhanced invokeTool to accept discovery_id (or legacy search_id), fall back to rolodex, and return structured errors for missing discovery_id.
    • Implemented progressive error recovery logic within invokeTool for both API and body-level failures.
    • Added truncation detection to invokeTool responses.
    • Updated inspectTool to return discovery_id when known and provide an invoke_hint if not found.
  • src/config/schema.help.ts
    • Updated help text for tools.qveris.searchTimeoutSeconds to refer to qveris_discover.
    • Updated help text for tools.qveris.executeTimeoutSeconds to refer to qveris_invoke.
  • src/config/types.tools.ts
    • Updated type definitions for searchTimeoutSeconds to refer to qveris_discover.
    • Updated type definitions for executeTimeoutSeconds to refer to qveris_invoke.
Activity
  • No specific activity (comments, reviews, progress) was provided in the context for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a substantial and well-executed pull request that significantly improves the clarity and robustness of the QVeris tool integration. Renaming the tools to discover, invoke, and inspect makes their purpose much clearer for the LLM. The addition of features like progressive error recovery, rate-limit awareness, and backward compatibility through aliases demonstrates great attention to detail and production readiness. The updates to the system prompts and documentation are also excellent. I've included a couple of minor suggestions for code improvements, but overall, this is a high-quality contribution.

Comment on lines +678 to +684
success: false,
error_type: "json_parse_error",
detail:
"Missing discovery_id for qveris_invoke. Run qveris_discover first, or call qveris_inspect for a previously used tool so the session rolodex can provide the discovery_id.",
retry_hint:
"Pass discovery_id from qveris_discover/qveris_inspect. If the tool was not previously used in this session, rediscover it to obtain one.",
} satisfies QverisErrorResult);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error_type is set to json_parse_error, but the actual issue is a missing discovery_id, which is more of a parameter validation error. Using json_parse_error could be misleading for the LLM or for debugging. Consider using a more appropriate error type, perhaps http_error with a synthetic status of 400 to indicate a bad request, which would be more semantically correct.

          success: false,
          error_type: "http_error",
          status: 400,
          detail:
            "Missing discovery_id for qveris_invoke. Run qveris_discover first, or call qveris_inspect for a previously used tool so the session rolodex can provide the discovery_id.",
          retry_hint:
            "Pass discovery_id from qveris_discover/qveris_inspect. If the tool was not previously used in this session, rediscover it to obtain one.",

Comment thread src/agents/tools/qveris-tools.ts Outdated
Comment on lines +713 to +716
const failCount = (invokeFailureCount.get(toolId) ?? 0) + 1;
invokeFailureCount.set(toolId, failCount);
const recoveryStep =
failCount === 1 ? "fix_params" : failCount === 2 ? "simplify" : "switch_tool";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This logic for incrementing the failure count and determining the recovery_step is duplicated in the else block below (lines 738-741) for handling API-level failures. To improve maintainability and reduce code duplication, consider extracting this logic into a helper function.

- Broaden QVeris scope to cover historical sequences, structured reports,
  web extraction, PDF workflows, and media processing/generation
- Add paired bilingual (Chinese/English) query rewrite examples to system
  prompt, tool schema, and documentation
- Dynamically gate prompt sections based on actual tool availability
  (hasInvoke, hasWebSearch, hasWebFetch) to avoid instructing on
  unavailable tools
- Add search_id legacy alias to QverisInvokeSchema for backward compat
- Deduplicate qverisExecutionLine (was inserted twice), merge step 2/3
  shared guidance, compact anti-patterns — ~24% fewer routing prompt lines
- Trim QverisDiscoverSchema.query description (~55% shorter) — detailed
  teaching stays in system prompt, schema is concise reinforcement
- Reorder toolOrder to place QVeris tools before web_search/web_fetch
- Conditionally narrow web_search summary when QVeris is available
- Update tool-catalog brief descriptions for clarity
- Update tests with bilingual and availability-gating assertions
- Update README.md, docs/qverisbot-from-source.md, AGENTS.md template

Made-with: Cursor
@linfangw

Copy link
Copy Markdown
Member Author

/gemini review

@linfangw
linfangw requested review from ax2, chris7iu and vxwork March 11, 2026 10:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a substantial and well-executed pull request that significantly improves the clarity and capability of the QVeris tool integration. The renaming of tools to discover, invoke, and inspect makes their purpose much clearer for the LLM. The addition of features like progressive error recovery, rate-limit awareness, and the reuse of discovery_id via the rolodex are excellent enhancements that will make the agent more robust and efficient. The backward compatibility for legacy tool names is also a thoughtful touch.

The documentation and tests have been updated thoroughly to reflect these changes. I've left a couple of minor suggestions in src/agents/tools/qveris-tools.ts related to code clarity and maintainability, but overall this is a very strong set of improvements.

Comment thread src/agents/tools/qveris-tools.ts Outdated
if (!discoveryId) {
return jsonResult({
success: false,
error_type: "json_parse_error",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error_type is set to json_parse_error for a missing discovery_id. While this is a client-side error that the LLM can fix, a more specific error type like parameter_error or validation_error would be more accurate. If adding a new error type to QverisErrorResult is feasible, it would improve the clarity of the error classification. However, the detailed detail and retry_hint are excellent and likely sufficient for the LLM to recover.

Comment thread src/agents/tools/qveris-tools.ts Outdated
Comment on lines 719 to 729
const failCount = (invokeFailureCount.get(toolId) ?? 0) + 1;
invokeFailureCount.set(toolId, failCount);
const recoveryStep =
failCount === 1 ? "fix_params" : failCount === 2 ? "simplify" : "switch_tool";
const classified = classifyQverisError(err);
return jsonResult({
...classified,
recovery_step: recoveryStep,
attempt_number: failCount,
});
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This block for handling invocation failures contains logic for incrementing the failure count and determining the next recovery step. This logic is duplicated in the else block on lines 744-757 that handles backend-reported failures. To improve maintainability and reduce redundancy, you could extract this logic into a helper function within the createQverisTools scope.

For example, you could create a helper like this:

function getNextRecoveryInfo(toolId: string) {
  const failCount = (invokeFailureCount.get(toolId) ?? 0) + 1;
  invokeFailureCount.set(toolId, failCount);
  const recoveryStep =
    failCount === 1 ? "fix_params" : failCount === 2 ? "simplify" : "switch_tool";
  return { recovery_step: recoveryStep, attempt_number: failCount };
}

And then use it in both places to simplify the code.

…main support

- Rename qveris_invoke to qveris_call across tools, schemas, prompts, and tests
- Implement V3 full-content auto-materialization: binary-safe download via
  readResponseBuffer, tryDecodeUtf8 for safe text derivation, file saving
  with manifest metadata (schema, preview, analysis) returned to model
- Security: HTTPS-only, strict domain whitelist, no redirects, opt-in default
  (autoMaterializeFullContent=false), size limits with accurate truncation
  detection (exact-boundary peek)
- Dual-domain: region config ("global"→qveris.ai, "cn"→qveris.cn) with
  dynamic base URL, whitelist derivation, and region-aware onboarding
- System prompt: conditional guidance based on autoMaterialize flag;
  text→web_fetch vs binary→exec+curl fallback when materialization is off
- Fix qveris_inspect endpoint path: /tools/get-by-ids → /tools/by-ids

Made-with: Cursor
The model no longer needs to pass or track discovery_id / search_id.
The integration layer auto-resolves the backend search_id from the
discover tracker (keyed by tool_id after qveris_discover) and falls
back to the rolodex (keyed by successful prior calls).

- DiscoverResultMeta now stores searchId; trackResults() accepts it
- resolveKnownSearchId() checks rolodex then discoverTracker
- QverisCallSchema: remove discovery_id and search_id parameters
- qveris_call handler uses resolveKnownSearchId exclusively
- Add "tool_not_discovered" error type for cleaner diagnostics
- Remove discovery_id from all model-facing output: discover payload,
  formatToolForModel, rolodex getSummary, inspect result
- qveris_inspect: replace invoke_hint with call_hint (no session context)
- System prompt: remove all discovery_id references from routing rules
  and tool summaries
- Tests: add makeDiscoverResponse/registerToolViaDiscover helpers;
  all qveris_call tests now go through discover first

Made-with: Cursor
@linfangw

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@chris7iu

Copy link
Copy Markdown

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant refactoring that renames the QVeris tools to discover, call, and inspect for better LLM clarity. It also introduces several valuable features like progressive error recovery, rate-limit awareness, truncation detection, and automatic materialization of large content. The changes are well-tested and the new features are robust.

My review found two main areas for improvement:

  1. There is a naming inconsistency for the qveris_call tool, which is referred to as qveris_invoke in some documentation files. This should be standardized.
  2. The system prompt instruction for the qveris_inspect workflow is confusing and could lead to inefficient behavior by the agent.

Overall, this is a great set of improvements. Addressing these points will enhance clarity and agent performance.

Comment thread README.md Outdated
| Tool | When to use |
| :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `qveris_discover` | Find specialized API/service tools for exact current values, historical sequence data, structured reports, web extraction, PDF workflows, or external professional services or media processing/generation (OCR, speech, image, video, translation, map, navigation, geocoding, etc.). **Preferred over `web_search`** when a specialized provider can return the answer or perform the work. Query in English describing the API capability needed. |
| `qveris_invoke` | Call a QVeris API/service tool to get structured data, reports, extracted web content, PDFs, or processed/generated media. Requires `tool_id` and `discovery_id` from `qveris_discover` or `qveris_inspect`. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's an inconsistency in the new tool name for executing a QVeris tool. This file and the release notes use qveris_invoke, but the codebase (e.g., src/agents/tool-catalog.ts) and other documentation files use qveris_call. To avoid confusion for developers and LLMs, this should be standardized. Since the implementation consistently uses qveris_call, I recommend updating the documentation to match.

Suggested change
| `qveris_invoke` | Call a QVeris API/service tool to get structured data, reports, extracted web content, PDFs, or processed/generated media. Requires `tool_id` and `discovery_id` from `qveris_discover` or `qveris_inspect`. |
| `qveris_call` | Call a QVeris API/service tool to get structured data, reports, extracted web content, PDFs, or processed/generated media. Requires `tool_id` and `discovery_id` from `qveris_discover` or `qveris_inspect`. |

? " -> Prefer qveris_discover + qveris_call. Specialized APIs/services return precise structured data or service outputs from dedicated providers."
: " -> Use qveris_discover to identify the best specialized API/service available in this session. If qveris_call is unavailable here, report the limitation honestly instead of promising a tool call you cannot make.";
const inspectLine = hasInspect
? " -> Use qveris_inspect with the known tool_id to verify availability and get current parameter schemas. If the tool is available, run qveris_discover to register it for this session, then call it."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The guidance for using qveris_inspect is confusing and promotes an inefficient workflow. It instructs the agent to use inspect and then immediately use discover before call, without explaining why both steps are necessary. This can be confusing for the LLM, which might wonder why it shouldn't just use discover directly.

The documentation in README.md also describes a different, more ideal flow that doesn't seem to match the implementation, adding to the confusion.

To improve clarity, consider revising this instruction to better explain the purpose of each step in the context of the agent's goals.

Suggested change
? " -> Use qveris_inspect with the known tool_id to verify availability and get current parameter schemas. If the tool is available, run qveris_discover to register it for this session, then call it."
? " -> If you have a tool_id but no discovery_id for the current session, use qveris_inspect to check the tool's details. If it's still suitable, you must then use qveris_discover to get a valid discovery_id before you can call it."

@linfangw
linfangw merged commit 377bb33 into main Mar 12, 2026
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants