Skip to main content
Glama

MCP Claude Code

by SDGLBL

batch

Execute multiple independent tool operations in a single request, enabling parallel or serial execution to reduce latency and context usage. Ideal for tasks like reading multiple files, running diagnostic commands, or dispatching agents simultaneously.

Instructions

Batch execution tool that runs multiple tool invocations in a single request.

Tools are executed in parallel when possible, and otherwise serially. Takes a list of tool invocations (tool_name and input pairs). Returns the collected results from all invocations. Use this tool when you need to run multiple independent tool operations at once -- it is awesome for speeding up your workflow, reducing both context usage and latency. Each tool will respect its own permissions and validation rules. The tool's outputs are NOT shown to the user; to answer the user's query, you MUST send a message with the results after the tool call completes, otherwise the user will not see the results.

<batch_example> When dispatching multiple agents to find necessary information. batch( description="Update import statements across modules", invocations=[ {tool_name: "dispatch_agent", input: {prompt: "Search for all instances of 'logger' configuration in /app/config directory"}}, {tool_name: "dispatch_agent", input: {prompt: "Find all test files that reference 'UserService' in /app/tests"}}, ] )

Common scenarios for effective batching:

  1. Reading multiple related files in one operation
  2. Performing a series of simple mechanical changes
  3. Running multiple diagnostic commands
  4. Dispatch multiple agents to complete the task

To make a batch call, provide the following:

  1. description: A short (3-5 word) description of the batch operation
  2. invocations: List of invocation [{"tool_name": "...", "input": "..."}], tool_name: The name of the tool to invoke,newText: The input to pass to the tool

Available tools in batch call: Tool: dispatch_agent,read,directory_tree,grep,grep_ast,run_command,notebook_read Not available: think,write,edit,multi_edit,notebook_edit

Input Schema

NameRequiredDescriptionDefault
descriptionYesA short (3-5 word) description of the batch operation
invocationsYesThe list of tool invocations to execute (required -- you MUST provide at least one tool invocation)

Input Schema (JSON Schema)

{ "$defs": { "InvocationItem": { "description": "A single tool invocation item.\n\nAttributes:\n tool_name: The name of the tool to invoke\n input: The input to pass to the tool", "properties": { "input": { "additionalProperties": true, "description": "The input to pass to the tool", "title": "Input", "type": "object" }, "tool_name": { "description": "The name of the tool to invoke", "minLength": 1, "title": "Tool Name", "type": "string" } }, "required": [ "tool_name", "input" ], "title": "InvocationItem", "type": "object" } }, "properties": { "description": { "description": "A short (3-5 word) description of the batch operation", "minLength": 1, "title": "Description", "type": "string" }, "invocations": { "description": "The list of tool invocations to execute (required -- you MUST provide at least one tool invocation)", "items": { "$ref": "#/$defs/InvocationItem" }, "minItems": 1, "title": "Invocations", "type": "array" } }, "required": [ "description", "invocations" ], "type": "object" }

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/SDGLBL/mcp-claude-code'

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