Skip to main content
Glama

get_slo

Retrieve detailed SLO (Service Level Objective) information from Honeycomb datasets using an SLO ID. Access data like compliance, target per million, budget remaining, and timestamps for precise observability analysis.

Instructions

Retrieves a specific SLO (Service Level Objective) by ID with detailed information. This tool returns a detailed object containing the SLO's ID, name, description, time period, target per million, compliance, budget remaining, SLI alias, and timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetYesThe dataset containing the SLO
environmentYesThe Honeycomb environment
sloIdYesThe ID of the SLO to retrieve

Implementation Reference

  • The handler function for the get_slo tool. It validates the input parameters (environment, dataset, sloId), fetches the SLO data using api.getSLO, simplifies the response into a structured object, and returns it in the expected MCP format with metadata. Errors are handled via handleToolError.
    handler: async ({ environment, dataset, sloId }: { environment: string; dataset: string; sloId: string }) => { // Validate input parameters if (!environment) { return handleToolError(new Error("environment parameter is required"), "get_slo"); } if (!dataset) { return handleToolError(new Error("dataset parameter is required"), "get_slo"); } if (!sloId) { return handleToolError(new Error("sloId parameter is required"), "get_slo"); } try { // Fetch SLO details from the API const slo = await api.getSLO(environment, dataset, sloId); // Simplify the response to reduce context window usage const simplifiedSLO: SimplifiedSLODetails = { id: slo.id, name: slo.name, description: slo.description || '', time_period_days: slo.time_period_days, target_per_million: slo.target_per_million, compliance: slo.compliance, budget_remaining: slo.budget_remaining, sli: slo.sli?.alias, created_at: slo.created_at, updated_at: slo.updated_at, }; return { content: [ { type: "text", text: JSON.stringify(simplifiedSLO, null, 2), }, ], metadata: { sloId, dataset, environment } }; } catch (error) { return handleToolError(error, "get_slo"); } }
  • Input schema for the get_slo tool using Zod validation for required parameters: environment, dataset, and sloId.
    schema: { environment: z.string().describe("The Honeycomb environment"), dataset: z.string().describe("The dataset containing the SLO"), sloId: z.string().describe("The ID of the SLO to retrieve"), },
  • TypeScript interface defining the simplified SLO data structure returned by the get_slo tool handler.
    interface SimplifiedSLODetails { id: string; name: string; description: string; time_period_days: number; target_per_million: number; compliance: number; budget_remaining: number; sli: string | undefined; created_at: string; updated_at: string; }
  • The get_slo tool is registered by calling createGetSLOTool(api) and adding it to the tools array in registerTools function, which then registers all tools with the MCP server.
    createGetSLOTool(api),

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