Skip to main content
Glama
honeycombio
by honeycombio

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");
          }
        }
      };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool returns a list with specific fields (names, descriptions, etc.), which adds behavioral context beyond the input schema. However, it lacks details on permissions, rate limits, pagination, or error handling, leaving some behavioral aspects unclear for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by additional details and a critical note. Every sentence adds value: the first explains what it does, the second details the return format, and the third provides an essential usage constraint. It is concise with zero wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 required parameters, no output schema, no annotations), the description is fairly complete. It covers purpose, return format, and a key constraint. However, without annotations or output schema, it could benefit from more behavioral details (e.g., response structure, error cases), slightly reducing completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (environment and dataset). The description adds value by clarifying that 'dataset' cannot be '__all__', which is a semantic constraint not in the schema. This compensates slightly, but most parameter semantics are covered by the schema, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Lists') and resource ('SLOs') with specific scope ('for a specific dataset'), distinguishing it from siblings like list_boards or list_datasets. It explicitly mentions what information is returned (names, descriptions, time periods, target per million events), making the purpose highly specific and well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when NOT to use this tool: it states that '__all__ is NOT supported as a dataset name' and clarifies that 'it is not possible to list all SLOs in an environment.' This gives clear boundaries and helps the agent avoid incorrect usage, which is optimal for usage guidelines.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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