Skip to main content
Glama

tool_call

Execute specific methods of various tools with required parameters using this function. Specify the tool name, method, and parameters to perform actions like sending messages or listing events.

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
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.
toolYesThe name of the tool to call (e.g., 'gmail', 'google-calendar', 'slack')

Implementation Reference

  • The execute method implements the core logic of the 'tool_call' tool. It constructs a URL based on the tool, method, and optional question, posts parameters to veyraxClient, returns the response as text content, and handles specific errors like 404 (not found) and 500 (server error).
    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 input validation for 'tool_call': required 'tool' (string), 'method' (string), 'parameters' (record, default {}), 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)
    Registers the ToolCallTool with the MCP server instance.
    new ToolCallTool().register(server);
  • Sets the name to 'tool_call' and provides the tool description within the ToolCallTool class.
    name = toolName;
    description = toolDescription;
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.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VeyraX/veyrax-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server