honeycomb_columns_list
Retrieve a complete list of columns for a specified dataset using the provided dataset slug to streamline data analysis and organization.
Instructions
List all columns in a dataset
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datasetSlug | Yes | Dataset slug to list columns for |
Implementation Reference
- index.ts:664-673 (handler)MCP tool handler for honeycomb_columns_list: extracts and validates arguments, calls HoneycombClient.listColumns, formats and returns the JSON response.case "honeycomb_columns_list": { const args = request.params.arguments as unknown as ColumnListArgs; if (!args.datasetSlug) { throw new Error("datasetSlug is required"); } const response = await client.listColumns(args.datasetSlug, args.key_name); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- index.ts:124-141 (schema)Defines the tool metadata, description, and input schema (datasetSlug required, key_name optional) for honeycomb_columns_list.const columnsListTool: Tool = { name: "honeycomb_columns_list", description: "List all columns in a dataset. Columns are fields in the events you send to Honeycomb.", inputSchema: { type: "object", properties: { datasetSlug: { type: "string", description: "The dataset slug.", }, key_name: { type: "string", description: "Optional: Filter columns by a specific name.", }, }, required: ["datasetSlug"], }, };
- index.ts:784-798 (registration)Registers the honeycomb_columns_list tool (as columnsListTool) in the list returned by ListToolsRequestHandler.tools: [ authTool, datasetsListTool, datasetGetTool, columnsListTool, queryCreateTool, queryGetTool, queryResultCreateTool, queryResultGetTool, datasetDefinitionsListTool, boardsListTool, boardGetTool, ], }; });
- index.ts:483-501 (helper)HoneycombClient helper method: constructs API URL for /columns/{datasetSlug}?key_name={key_name}, performs GET request, returns parsed JSON.async listColumns(datasetSlug: string, keyName?: string): Promise<any> { let url = `${this.baseUrl}/columns/${datasetSlug}`; // key_nameパラメータが指定されている場合、URLクエリに追加 if (keyName) { url += `?key_name=${encodeURIComponent(keyName)}`; } const response = await fetch(url, { method: "GET", headers: this.headers, }); if (!response.ok) { throw new Error(`Failed to list columns: ${response.statusText}`); } return await response.json(); }