Skip to main content
Glama
kajirita2002

honeycomb-mcp-server

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
NameRequiredDescriptionDefault
datasetSlugYesDataset slug the query belongs to
queryIdYesQuery ID to retrieve

Implementation Reference

  • 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"],
      },
    };
  • 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) }],
      };
    }
  • 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,
    ],
  • TypeScript interface defining the input arguments for the honeycomb_query_get tool.
    interface QueryGetArgs {
      datasetSlug: string;
      queryId: string;
    }

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

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