Skip to main content
Glama
TaylorChen

Multi-MCPs

by TaylorChen

get_directions

Calculate routes between two locations using the Multi-MCPs server's integrated mapping service.

Instructions

Get directions between origin and destination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
destinationYes

Implementation Reference

  • The handler function for the 'get_directions' tool. It validates the origin and destination arguments and delegates to the GoogleMapsClient.getDirections method.
    async get_directions(args: Record<string, unknown>) {
      if (!cfg.googleApiKey) throw new Error("GOOGLE_API_KEY is not configured");
      const origin = String(args.origin || "");
      const destination = String(args.destination || "");
      if (!origin || !destination) throw new Error("origin and destination are required");
      return client.getDirections(origin, destination);
    },
  • Registration of the 'get_directions' tool within the Google Maps API registration, including name, description, and input schema.
    {
      name: "get_directions",
      description: "Get directions between origin and destination",
      inputSchema: {
        type: "object",
        properties: {
          origin: { type: "string" },
          destination: { type: "string" },
        },
        required: ["origin", "destination"],
      },
    },
  • Helper method on GoogleMapsClient that performs the actual API request to Google Directions API.
    getDirections(origin: string, destination: string) {
      return this.request("/maps/api/directions/json", {
        query: { origin, destination, key: this.apiKey },
      });
    }
  • Top-level registration call to registerGoogleMaps(), which includes the 'get_directions' tool among others.
    registerGoogleMaps(),
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 of behavioral disclosure. It states the tool 'Get directions' but doesn't describe what the directions include (e.g., route steps, distance, duration), whether it requires authentication, rate limits, or how it handles errors like invalid locations. This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (routing between two points), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain return values, error handling, or behavioral details, leaving the agent with insufficient information to use the tool effectively beyond basic invocation.

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

Parameters2/5

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

The input schema has 0% description coverage, so the description must compensate. It mentions 'origin and destination' but doesn't explain what format these parameters should be in (e.g., addresses, coordinates, place names) or any constraints. This adds minimal semantic value beyond the parameter names, failing to adequately cover the two required parameters.

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 verb 'Get' and the resource 'directions', specifying the action and what it returns. It distinguishes from siblings by focusing on routing rather than weather, news, or other functions. However, it doesn't explicitly differentiate from similar tools like 'search_places' or 'geocode_address', which might handle location data differently.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing valid addresses or coordinates, or compare it to siblings like 'geocode_address' for location processing or 'search_places' for finding points of interest. Usage is implied only by the tool name and description.

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

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/TaylorChen/muti-mcps'

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