Skip to main content
Glama

invoke_tool

Run a tool found by discover_tools. Large results are stored server-side and returned as a compact ref envelope (ref_id + preview); page through them with fetch_ref. Same auth rules as calling the tool directly (gateway key, BYOK).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tool_uid": "<tool_uid>"
    },
    "name": "invoke_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
tool_uidYestool_uid from discover_tools, e.g. 'weather__get_forecast'.
argumentsNoArguments for the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/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 does real work: it discloses that large results are truncated server-side into a ref envelope (ref_id + preview) and that the same gateway-key/BYOK auth rules apply as a direct call. It omits anything about the side effects of the invoked tool (which may be destructive) or error behavior, which are meaningful gaps for a generic dispatcher.

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?

Three tight sentences, front-loaded with the core action, then result handling, then auth — nothing redundant and no filler.

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 two-param dispatcher with no annotations or output schema and a nested arguments object, the description covers origin of the uid, result-shape behavior, paging, and auth. Missing only error semantics and side-effect warnings, which keep it short of complete.

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 coverage is 100% and tool_uid's description already gives the format and an example, so the schema does the heavy lifting. The description adds no further meaning about how `arguments` must be shaped for the target tool, leaving it at the baseline.

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?

'Run a tool found by discover_tools' states a concrete verb and resource, and immediately ties the tool into the discover_tools → invoke_tool → fetch_ref workflow, so it's distinguishable from both siblings without opening any schema.

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

Usage Guidelines4/5

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

It states the prerequisite (the tool must have been found via discover_tools) and routes the agent to fetch_ref when results are large, and it flags the auth model. It stops short of explicit exclusions such as how to handle errors from the invoked tool or when not to invoke a mutation.

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.