Skip to main content
Glama

discover_tools

Two-step tool finder and executor for all enterprise APIs.

STEP 1 — DISCOVER: Call with only 'query'. Returns matching tools with their names and inputSchemas.

STEP 2 — EXECUTE: Call again with 'query' + 'tool_name' + 'tool_args'. Gateway executes the tool and returns real data directly.

You NEVER call any other tool directly. Always use discover_tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamNoOptional department filter.
queryYesUser intent in plain natural language.
top_kNoNumber of tools to return. Default 5, max 10.
tool_argsNoSTEP 2 only — arguments matching the tool's inputSchema exactly.
tool_nameNoSTEP 2 only — exact tool name from previous discover response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / tool_args / description
      Previous value: -"STEP 2 only — arguments matching the tool's inputSchema exactly. Provide together with tool_name to execute the tool."New value: +"STEP 2 only — arguments matching the tool's inputSchema exactly."
    • changedInput schema / properties / tool_name / description
      Previous value: -"STEP 2 only — exact tool name from previous discover response. Must match a name returned in the previous discover call exactly."New value: +"STEP 2 only — exact tool name from previous discover response."
  2. Changed4 schema fields changed
    • changedInput schema / properties / query / description
      Previous value: -"The user's intent in plain natural language."New value: +"User intent in plain natural language."
    • changedInput schema / properties / tool_args / description
      Previous value: -"Arguments to execute the discovered tool immediately. Pass the exact arguments from the inputSchema returned in the previous discover_tools response. When provided with a single matched tool, the gateway executes it and returns real data directly."New value: +"STEP 2 only — arguments matching the tool's inputSchema exactly. Provide together with tool_name to execute the tool."
    • addedInput schema / properties / tool_name
      Added value: +{
      +  "description": "STEP 2 only — exact tool name from previous discover response. Must match a name returned in the previous discover call exactly.",
      +  "type": "string"
      +}
    • changedInput schema / properties / top_k / description
      Previous value: -"Number of tools to return. Default 5, maximum 10."New value: +"Number of tools to return. Default 5, max 10."
  3. Changed3 schema fields changed
    • changedInput schema / properties / query / description
      Previous value: -"The user's intent in plain natural language. Be descriptive — include the action, the subject, and any relevant context. More detail produces better matches."New value: +"The user's intent in plain natural language."
    • changedInput schema / properties / team / description
      Previous value: -"Optional department or team filter to narrow results. Only set this if the user explicitly mentions a team or department."New value: +"Optional department filter."
    • addedInput schema / properties / tool_args
      Added value: +{
      +  "description": "Arguments to execute the discovered tool immediately. Pass the exact arguments from the inputSchema returned in the previous discover_tools response. When provided with a single matched tool, the gateway executes it and returns real data directly.",
      +  "type": "object"
      +}
  4. Added

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does well by disclosing that this is a gateway that executes tools and returns real data, and that it requires a two-step flow. It could add a caution that executing a tool may trigger side effects depending on the underlying API, but the general execution behavior is clearly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: the purpose is stated first, then each step is concise and actionable. Every sentence earns its place, and the formatting makes the two-step flow easy to follow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter gateway with no output schema and no annotations, the description covers the full invocation flow, parameter roles, and the nature of responses. It does not cover edge cases like no matching tools or execution failures, but those are secondary to correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already explains each parameter clearly, including 'STEP 2 only' for tool_name and tool_args. The description adds step-level context but does not provide meaningful parameter details beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly identifies the tool as a 'two-step tool finder and executor' for enterprise APIs and breaks out the discover and execute steps. This leaves no ambiguity about its core purpose, and since there are no siblings, no differentiation is needed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit step-by-step invocation guidance: call with only 'query' first, then call again with 'query' plus 'tool_name' and 'tool_args'. The final instruction, 'You NEVER call any other tool directly. Always use discover_tools,' gives a decisive routing rule that leaves no room for misuse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources