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
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (from list_projects) | |
| runId | Yes | Run 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}`, }, - src/tools.ts:245-248 (schema)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)"), }), - src/tools.ts:3-7 (helper)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); - src/index.ts:16-25 (handler)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); }); }