Skip to main content
Glama

tools_schema

Retrieves the JSON schema for a specified tool, providing the required column mapping and module parameters needed before execution.

Instructions

Get JSON schema for a tool — column_mapping and module_parameters required before tools_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tool_nameYesName of the tool

Implementation Reference

  • src/index.js:46-46 (registration)
    The tool 'tools_schema' is registered in the STATIC_TOOLS array as a static tool catalog entry used for inspection/fallback. It has an inputSchema requiring a 'tool_name' string property.
    { name: "tools_schema", description: "Get JSON schema for a tool — column_mapping and module_parameters required before tools_run.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool" } }, required: ["tool_name"] } },
  • The CallToolRequestSchema handler proxies all tool call requests (including tools_schema) to the remote MCP server via remoteClient.callTool().
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      if (!remoteClient) {
        return {
          content: [
            {
              type: "text",
              text: "MCP Analytics API key required. Set MCP_ANALYTICS_API_KEY in your environment.\nGet a free key at https://app.mcpanalytics.ai",
            },
          ],
          isError: true,
        };
      }
    
      try {
        const result = await remoteClient.callTool({
          name: request.params.name,
          arguments: request.params.arguments || {},
        });
        return result;
      } catch (err) {
        return {
          content: [{ type: "text", text: `Error: ${err.message}` }],
          isError: true,
        };
      }
    });
  • When an API key is present, a remote client connects to the MCP API and fetches the live tool catalog (which includes tools_schema handler logic from the server side).
    if (API_KEY) {
      try {
        const transport = new StreamableHTTPClientTransport(
          new URL(`${API_URL}/mcp/api-key`),
          { requestInit: { headers: { "X-API-Key": API_KEY } } }
        );
    
        remoteClient = new Client({
          name: "mcp-analytics-proxy",
          version: "1.0.0",
        });
    
        await remoteClient.connect(transport);
    
        // Fetch live tool catalog
        const liveTools = [];
        let cursor;
        do {
          const { tools, nextCursor } = await remoteClient.listTools({ cursor });
          liveTools.push(...tools);
          cursor = nextCursor;
        } while (cursor);
    
        toolCatalog = liveTools;
        process.stderr.write(
          `[mcp-analytics] Connected to ${API_URL}. ${toolCatalog.length} tools available.\n`
        );
      } catch (err) {
        process.stderr.write(
          `[mcp-analytics] Could not connect to remote (${err.message}). Using static catalog (${STATIC_TOOLS.length} tools).\n`
        );
        remoteClient = null;
      }
    } else {
  • Input schema for tools_schema: requires a 'tool_name' (string) property. The tool returns the JSON schema for the specified analysis tool's column_mapping and module_parameters.
    { name: "tools_schema", description: "Get JSON schema for a tool — column_mapping and module_parameters required before tools_run.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool" } }, required: ["tool_name"] } },
Behavior2/5

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

No annotations provided, so the description carries full burden. It does not disclose if the operation is read-only or any side effects, leaving behavioral gaps.

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 a single sentence that conveys purpose and a usage hint with no unnecessary words.

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?

For a simple tool with one parameter and no output schema, the description covers the basic purpose and a prerequisite but omits details about the return format or read-only nature.

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%, so baseline is 3. The description adds no extra meaning to the parameter beyond what the schema provides.

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 it retrieves JSON schema for a tool and mentions a prerequisite. It is specific but does not explicitly differentiate from siblings like tools_info or tools_run.

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

Usage Guidelines3/5

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

The description implies usage before tools_run by requiring column_mapping and module_parameters, but it does not provide explicit when-not-to-use or alternative tool names.

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/embeddedlayers/mcp-analytics'

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