Skip to main content
Glama

tools_run

Execute an analysis tool on business data (Shopify, Stripe, etc.) to generate a shareable interactive HTML report URL. Use tool_name and taskList to run statistical, forecasting, or ML analyses.

Instructions

Execute an analysis tool. Returns a shareable interactive HTML report URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tool_nameYesName of the tool to execute
taskListYesContains inputs: dataset, userContext, column_mapping, module_parameters

Implementation Reference

  • Schema definition for the 'tools_run' tool — it expects tool_name (string) and taskList (object with dataset, userContext, column_mapping, module_parameters).
    { name: "tools_run", description: "Execute an analysis tool. Returns a shareable interactive HTML report URL.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool to execute" }, taskList: { type: "object", description: "Contains inputs: dataset, userContext, column_mapping, module_parameters" } }, required: ["tool_name", "taskList"] } },
  • src/index.js:43-63 (registration)
    Static tool catalog that registers 'tools_run' along with all other tools as a fallback for inspection mode.
    const STATIC_TOOLS = [
      { name: "about", description: "Get platform info, pricing, usage stats, or documentation.", inputSchema: { type: "object", properties: { topic: { type: "string", description: "Topic: platform, pricing, current_usage, manual, or a docs section" } }, required: ["topic"] } },
      { name: "discover_tools", description: "Find analysis tools matching your data or question. Semantic search across 50+ statistical and ML tools.", inputSchema: { type: "object", properties: { query: { type: "string", description: "Text query describing what you want to analyze" }, dataset: { type: "string", description: "Dataset UUID to match tools against" } } } },
      { 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"] } },
      { name: "tools_run", description: "Execute an analysis tool. Returns a shareable interactive HTML report URL.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool to execute" }, taskList: { type: "object", description: "Contains inputs: dataset, userContext, column_mapping, module_parameters" } }, required: ["tool_name", "taskList"] } },
      { name: "tools_info", description: "Get detailed information about a specific analysis tool — use cases, assumptions, data requirements.", inputSchema: { type: "object", properties: { tool_name: { type: "string", description: "Name of the tool" } }, required: ["tool_name"] } },
      { name: "datasets_upload", description: "Generate a secure upload token for CSV files. Returns UUID + curl command for the user.", inputSchema: { type: "object", properties: { expires_in: { type: "integer", description: "Token expiration in seconds", default: 300 } } } },
      { name: "datasets_list", description: "List and search uploaded datasets with fuzzy matching.", inputSchema: { type: "object", properties: { search: { type: "string", description: "Search by name, description, or tags" }, limit: { type: "integer", description: "Max results", default: 20 } } } },
      { name: "datasets_read", description: "Read dataset contents — preview rows, columns, and types.", inputSchema: { type: "object", properties: { uuid: { type: "string", description: "Dataset UUID" }, secret: { type: "string", description: "Dataset secret key" }, rows: { type: "integer", description: "Number of rows to preview", default: 10 } }, required: ["uuid"] } },
      { name: "datasets_download", description: "Generate a single-use download token for securely downloading datasets.", inputSchema: { type: "object", properties: { uuid: { type: "string", description: "Dataset UUID" } }, required: ["uuid"] } },
      { name: "datasets_update", description: "Update dataset metadata — name, description, tags, visibility.", inputSchema: { type: "object", properties: { uuid: { type: "string", description: "Dataset UUID" } }, required: ["uuid"] } },
      { name: "connectors_list", description: "List available data connectors — GA4, Google Search Console, and more.", inputSchema: { type: "object", properties: {} } },
      { name: "connectors_query", description: "Pull live data from a connected source using connector:// URIs.", inputSchema: { type: "object", properties: { uri: { type: "string", description: "Connector URI (e.g., connector://mcpanalytics_gsc/search_analytics?...)" } }, required: ["uri"] } },
      { name: "reports_list", description: "List analysis reports with metadata.", inputSchema: { type: "object", properties: { limit: { type: "integer", description: "Max results", default: 10 } } } },
      { name: "reports_search", description: "Search reports by job ID, tool name, or keyword.", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query" }, job_ids: { type: "array", items: { type: "string" }, description: "Filter by processing IDs" } } } },
      { name: "reports_view", description: "View a specific report by processing ID.", inputSchema: { type: "object", properties: { processing_id: { type: "string", description: "Processing ID from tools_run" } }, required: ["processing_id"] } },
      { name: "report_cards", description: "Get individual card data from a report for rendering.", inputSchema: { type: "object", properties: { processing_id: { type: "string" } }, required: ["processing_id"] } },
      { name: "agent_advisor", description: "Conversational AI that guides analysis and interprets results.", inputSchema: { type: "object", properties: { message: { type: "string", description: "Your question or request" } }, required: ["message"] } },
      { name: "billing", description: "Check credit balance, subscription status, or open billing portal.", inputSchema: { type: "object", properties: { action: { type: "string", enum: ["status", "portal", "usage"], description: "Billing action", default: "status" } } } },
      { name: "module_request", description: "Request a custom analysis module to be built for your use case.", inputSchema: { type: "object", properties: { description: { type: "string", description: "Describe the analysis you need" } }, required: ["description"] } },
    ];
  • Generic CallTool handler that proxies all tool calls (including 'tools_run') to the remote MCP server via remoteClient.callTool(). This is the execution path for 'tools_run'.
    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,
        };
      }
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the output is a URL but does not disclose whether the tool mutates data, requires special permissions, or has side effects. As an execution tool, it should clarify if it's destructive or read-only, which is missing.

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 only one sentence, making it concise and front-loaded. It communicates two key facts: execution and output format. However, it could be slightly more informative without losing conciseness, hence a 4.

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 lack of output schema, the description should elaborate on the return value (e.g., URL format, error handling, or report nature). It only states 'shareable interactive HTML report URL' without further detail, leaving gaps for an agent needing to interpret results.

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?

The input schema has 100% description coverage, so the baseline is 3. The description adds no additional meaning beyond what the schema already provides (tool_name and taskList). It does not explain nested structure or constraints, but the schema is sufficient.

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 executes an analysis tool and returns a shareable interactive HTML report URL. It uses a specific verb ('Execute') and identifies the resource ('analysis tool'), making the purpose clear. However, it does not explicitly differentiate from sibling tools like tools_info or tools_schema, preventing a 5.

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, nor does it mention when not to use it or any prerequisites. For example, it doesn't compare with module_request or tools_schema, leaving the agent without context for selection.

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