Skip to main content
Glama
competlab

competlab-mcp-server

get_pricing_run_detail

Retrieve full competitor-by-competitor pricing intelligence for a historical run to investigate pricing changes and audit past monitoring cycles. Returns JSON with same structure as current dashboard.

Instructions

Get full competitor-by-competitor Pricing Intelligence data for a specific historical run. Returns the same data structure as get_pricing_dashboard but for a past point in time. Use this to investigate pricing changes between runs or audit a specific monitoring cycle. Requires runId from get_pricing_history. Read-only. Returns JSON object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (from list_projects)
runIdYesRun ID (from get_pricing_history)

Implementation Reference

  • src/tools.ts:241-250 (registration)
    The tool 'get_pricing_run_detail' is defined in the tools array with name, description, Zod parameters (projectId and runId), and a dynamic API path builder.
    {
      name: "get_pricing_run_detail",
      description:
        "Get full competitor-by-competitor Pricing Intelligence data for a specific historical run. Returns the same data structure as get_pricing_dashboard but for a past point in time. Use this to investigate pricing changes between runs or audit a specific monitoring cycle. Requires runId from get_pricing_history. Read-only. Returns JSON object.",
      parameters: z.object({
        projectId: objectId("Project ID (from list_projects)"),
        runId: objectId("Run ID (from get_pricing_history)"),
      }),
      path: (a) => `/v1/projects/${a.projectId}/pricing/history/${a.runId}`,
    },
  • Input schema for get_pricing_run_detail: projectId (24-char hex ObjectId) and runId (24-char hex ObjectId), both validated with regex.
    parameters: z.object({
      projectId: objectId("Project ID (from list_projects)"),
      runId: objectId("Run ID (from get_pricing_history)"),
    }),
  • The objectId helper is used to validate both the projectId and runId parameters as 24-character hex strings.
    const objectId = (desc: string) =>
      z
        .string()
        .regex(/^[a-f\d]{24}$/i, "Invalid ID format — must be a 24-character hex string")
        .describe(desc);
  • The generic handler that executes all tools. It iterates over the tools array, calls the path builder with args, collects query params, and invokes apiGet to make the API call. This same handler processes get_pricing_run_detail.
    for (const tool of tools) {
      server.tool(tool.name, tool.description, tool.parameters.shape, async (args: Record<string, any>) => {
        const path = tool.path(args);
        const query: Record<string, any> = {};
        for (const key of tool.queryParams ?? []) {
          if (args[key] !== undefined) query[key] = args[key];
        }
        return apiGet(path, Object.keys(query).length ? query : undefined);
      });
    }
Behavior4/5

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

Without annotations, the description carries full behavioral burden. It declares the operation as 'Read-only' and states the return type as 'JSON object' with the same structure as get_pricing_dashboard. This covers safety and output format. However, further details like rate limits or data volume caps would be beneficial. A 4 is appropriate.

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 three sentences, each essential: first states the action, second differentiates from sibling, third provides usage context and prerequisite, fourth notes read-only and return type. No redundancy or fluff. Ideal conciseness earned a 5.

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

Completeness5/5

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

Given the sibling tool set includes get_pricing_dashboard and get_pricing_history, the description ties everything together by referencing the dashboard's structure and pointing to get_pricing_history for runId. It covers purpose, usage, parameters, behavior, and relation to other tools. Fully complete for its complexity.

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

Parameters4/5

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

The input schema has 100% coverage with descriptions for both parameters. The description adds value by specifying that runId comes from get_pricing_history, which helps an agent understand the retrieval chain. This exceeds what the schema alone provides, earning a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves 'full competitor-by-competitor Pricing Intelligence data for a specific historical run.' It explicitly distinguishes itself from sibling tool get_pricing_dashboard by positioning itself for past data, not current. This specificity in verb, resource, and scope warrants 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 Guidelines5/5

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

The description advises using the tool to 'investigate pricing changes between runs or audit a specific monitoring cycle' and explicitly requires 'runId from get_pricing_history.' This gives clear when-to-use guidance and a necessary prerequisite, making usage intentions unambiguous.

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/competlab/competlab-mcp-server'

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