honeycomb_query_get
Retrieve specific query details by providing the dataset slug and query ID from the honeycomb-mcp-server. Simplify query information access for targeted datasets.
Instructions
Get information about a specific query
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datasetSlug | Yes | Dataset slug the query belongs to | |
| queryId | Yes | Query ID to retrieve |
Implementation Reference
- index.ts:271-288 (schema)Defines the Tool object for 'honeycomb_query_get' including name, description, and input schema requiring datasetSlug and queryId.const queryGetTool: Tool = { name: "honeycomb_query_get", description: "Get information about a specific query. Returns the query specification, not the query results.", inputSchema: { type: "object", properties: { datasetSlug: { type: "string", description: "The dataset slug or use `__all__` for endpoints that support environment-wide operations.", }, queryId: { type: "string", description: "The unique identifier (ID) of the query.", }, }, required: ["datasetSlug", "queryId"], }, };
- index.ts:690-702 (handler)MCP tool handler case that validates arguments, calls HoneycombClient.getQuerySpec, and returns the JSON response.case "honeycomb_query_get": { const args = request.params.arguments as unknown as QueryGetArgs; if (!args.datasetSlug || !args.queryId) { throw new Error("datasetSlug and queryId are required"); } const response = await client.getQuerySpec( args.datasetSlug, args.queryId ); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- index.ts:522-533 (helper)HoneycombClient method that performs the actual HTTP GET request to retrieve the query specification from the Honeycomb API.async getQuerySpec(datasetSlug: string, queryId: string): Promise<any> { const response = await fetch(`${this.baseUrl}/queries/${datasetSlug}/${queryId}`, { method: "GET", headers: this.headers, }); if (!response.ok) { throw new Error(`Failed to get query spec: ${response.statusText}`); } return await response.json(); }
- index.ts:784-796 (registration)Registers the queryGetTool in the list of available tools returned by ListToolsRequestHandler.tools: [ authTool, datasetsListTool, datasetGetTool, columnsListTool, queryCreateTool, queryGetTool, queryResultCreateTool, queryResultGetTool, datasetDefinitionsListTool, boardsListTool, boardGetTool, ],
- index.ts:61-64 (schema)TypeScript interface defining the input arguments for the honeycomb_query_get tool.interface QueryGetArgs { datasetSlug: string; queryId: string; }