Skip to main content
Glama

list_slos

Retrieve available Service Level Objectives (SLOs) for a specific Honeycomb dataset and environment, including names, descriptions, time periods, and success targets.

Instructions

Lists available SLOs (Service Level Objectives) for a specific dataset. This tool returns a list of all SLOs available in the specified environment, including their names, descriptions, time periods, and target per million events expected to succeed. NOTE: all is NOT supported as a dataset name -- it is not possible to list all SLOs in an environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYesThe Honeycomb environment
datasetYesThe dataset to fetch SLOs from

Implementation Reference

  • Handler function that validates parameters, fetches SLOs via api.getSLOs(environment, dataset), simplifies the data to id, name, description, time_period_days, target_per_million, and returns formatted text content with count metadata.
    handler: async ({ environment, dataset }: z.infer<typeof DatasetArgumentsSchema>) => { // Validate input parameters if (!environment) { return handleToolError(new Error("environment parameter is required"), "list_slos"); } if (!dataset) { return handleToolError(new Error("dataset parameter is required"), "list_slos"); } try { // Fetch SLOs from the API const slos = await api.getSLOs(environment, dataset); // Simplify the response to reduce context window usage const simplifiedSLOs: SimplifiedSLO[] = slos.map(slo => ({ id: slo.id, name: slo.name, description: slo.description || '', time_period_days: slo.time_period_days, target_per_million: slo.target_per_million, })); return { content: [ { type: "text", text: JSON.stringify(simplifiedSLOs, null, 2), }, ], metadata: { count: simplifiedSLOs.length, dataset, environment } }; } catch (error) { return handleToolError(error, "list_slos"); } }
  • Zod input schema defining required string parameters: environment and dataset.
    schema: { environment: z.string().describe("The Honeycomb environment"), dataset: z.string().describe("The dataset to fetch SLOs from"), },
  • Import of the createListSLOsTool factory function.
    import { createListSLOsTool } from "./list-slos.js";
  • Instantiation of the list_slos tool using createListSLOsTool(api) and addition to the tools array for registration with the MCP server.
    createListSLOsTool(api),
  • Factory function that creates the tool object including name, description, schema, and handler for list_slos.
    export function createListSLOsTool(api: HoneycombAPI) { return { name: "list_slos", description: "Lists available SLOs (Service Level Objectives) for a specific dataset. This tool returns a list of all SLOs available in the specified environment, including their names, descriptions, time periods, and target per million events expected to succeed. NOTE: __all__ is NOT supported as a dataset name -- it is not possible to list all SLOs in an environment.", schema: { environment: z.string().describe("The Honeycomb environment"), dataset: z.string().describe("The dataset to fetch SLOs from"), }, /** * Handler for the list_slos tool * * @param params - The parameters for the tool * @param params.environment - The Honeycomb environment * @param params.dataset - The dataset to fetch SLOs from * @returns Simplified list of SLOs with relevant metadata */ handler: async ({ environment, dataset }: z.infer<typeof DatasetArgumentsSchema>) => { // Validate input parameters if (!environment) { return handleToolError(new Error("environment parameter is required"), "list_slos"); } if (!dataset) { return handleToolError(new Error("dataset parameter is required"), "list_slos"); } try { // Fetch SLOs from the API const slos = await api.getSLOs(environment, dataset); // Simplify the response to reduce context window usage const simplifiedSLOs: SimplifiedSLO[] = slos.map(slo => ({ id: slo.id, name: slo.name, description: slo.description || '', time_period_days: slo.time_period_days, target_per_million: slo.target_per_million, })); return { content: [ { type: "text", text: JSON.stringify(simplifiedSLOs, null, 2), }, ], metadata: { count: simplifiedSLOs.length, dataset, environment } }; } catch (error) { return handleToolError(error, "list_slos"); } } }; }

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

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