Skip to main content
Glama
clarenous
by clarenous

tool_call

Execute methods from integrated tools by specifying tool name, method, and required parameters. Access multiple tools through unified VeyraX MCP authentication.

Instructions

"Use this tool to execute a specific method of another tool with the provided parameters based on get-tools tool response. You need to specify the tool name, method name, and any required parameters for that method."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYesThe name of the tool to call (e.g., 'gmail', 'google-calendar', 'slack')
methodYesThe method of the tool to call (e.g., 'get_messages', 'send_message', 'list_events')
parametersNoThe parameters required by the specific tool method being called, it is MUST HAVE field.
questionNoUser question that you want find answer for. Try to ALWAYS provide this field based on conversation with user. Could be your reasoning for calling tool.

Implementation Reference

  • The `execute` method implements the core logic of the 'tool_call' tool. It constructs a URL with the specified tool and method, sends a POST request with parameters using veyraxClient, and returns the response as formatted JSON. Includes error handling for 404 (not found) and 500 (server error) cases.
    async execute({ tool, method, parameters, question }: z.infer<typeof this.schema>) {
      try {
        const url = `/tool-call/${tool}/${method}?include_component=false${question ? `&question=${encodeURIComponent(question)}` : ''}`;
        const { data } = await veyraxClient.post(url, parameters);
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(data, null, 2),
            },
          ],
        };
      } catch (error: any) {
        console.error(`Error calling tool ${tool}.${method}:`, error);
        
        if (error?.response) {
          if (error.response.status === 404) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Tool or method not found: ${tool}.${method}. Please check the tool name and method name.`,
                },
              ],
            };
          } else if (error.response.status === 500) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Server error occurred while calling ${tool}.${method}. Please try again later.`,
                },
              ],
            };
          }
        }
        
        throw error;
      }
    }
  • Zod schema defining the input structure for the 'tool_call' tool, including required fields: tool (string), method (string), parameters (object), and optional question (string).
    schema = z.object({
      tool: z.string().describe("The name of the tool to call (e.g., 'gmail', 'google-calendar', 'slack')"),
      method: z.string().describe("The method of the tool to call (e.g., 'get_messages', 'send_message', 'list_events')"),
      parameters: z.record(z.any())
        .default({})
        .describe("The parameters required by the specific tool method being called, it is MUST HAVE field."),
      question: z.string()
        .optional()
        .describe("User question that you want find answer for. Try to ALWAYS provide this field based on conversation with user. Could be your reasoning for calling tool.")
    });
  • src/index.ts:14-14 (registration)
    Registration of the ToolCallTool instance with the MCP server, making the 'tool_call' tool available.
    new ToolCallTool().register(server);

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that parameters are 'based on get-tools tool response,' which hints at dependency, but doesn't disclose critical behavioral traits like error handling, authentication needs, rate limits, or what happens if invalid tool/method names are provided. For a meta-tool that executes other tools, this lack of transparency is a significant gap.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that are front-loaded with the main purpose. Every sentence earns its place by explaining the tool's function and prerequisite. However, it could be slightly more concise by combining ideas, and the structure is simple but effective.

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

Completeness3/5

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

Given the tool's complexity as a meta-execution tool with no annotations and no output schema, the description is moderately complete. It covers the purpose and prerequisite but lacks details on behavioral aspects like error handling or return values. For a tool that dynamically invokes other tools, more context on execution flow and results would be beneficial.

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%, so the schema already documents all four parameters thoroughly. The description adds minimal value beyond the schema by mentioning that parameters are 'required for that method' and 'based on get-tools tool response,' but doesn't provide additional syntax, format, or examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'execute a specific method of another tool with the provided parameters based on get-tools tool response.' It specifies the verb ('execute'), resource ('method of another tool'), and prerequisite ('based on get-tools tool response'). However, it doesn't explicitly differentiate from sibling tools like 'get_flow' or 'get_tools' beyond mentioning the latter as a prerequisite.

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?

The description provides clear context for when to use this tool: after using 'get_tools' to discover available tools and methods. It implies usage by stating 'based on get-tools tool response,' which guides the agent to first call 'get_tools.' However, it doesn't explicitly state when NOT to use it or name alternatives, such as directly calling other tools if their methods are already known.

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

Deploy Server

Other Tools