Skip to main content
Glama

list_slos

Retrieve a list of Service Level Objectives (SLOs) for a specified dataset and environment, including names, descriptions, time periods, and success targets per million events.

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
datasetYesThe dataset to fetch SLOs from
environmentYesThe Honeycomb environment

Implementation Reference

  • Handler function for list_slos tool: validates environment and dataset, fetches SLOs via api.getSLOs, simplifies to id, name, description, time_period_days, target_per_million, returns JSON stringified content with 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 requiring 'environment' and 'dataset' strings.
    schema: { environment: z.string().describe("The Honeycomb environment"), dataset: z.string().describe("The dataset to fetch SLOs from"), },
  • Registration of list_slos tool via createListSLOsTool(api) in the tools array passed to registerTools function.
    createListSLOsTool(api),
  • TypeScript interface defining the simplified SLO structure returned by the tool.
    interface SimplifiedSLO { id: string; name: string; description: string; time_period_days: number; target_per_million: number; }
  • Import of createListSLOsTool from list-slos.js for tool registration.
    import { createListSLOsTool } from "./list-slos.js";

Other Tools

Related Tools

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