Skip to main content
Glama

get_slo

Retrieve detailed Service Level Objective information by ID from Honeycomb observability data. Get SLO metrics including compliance, target, time period, and budget remaining for monitoring system performance.

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
environmentYesThe Honeycomb environment
datasetYesThe dataset containing the SLO
sloIdYesThe ID of the SLO to retrieve

Implementation Reference

  • The handler function that implements the core logic of the 'get_slo' tool: validates parameters, fetches SLO data using the Honeycomb API, simplifies the response structure, and returns it in MCP format.
    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"); } }
  • Zod schema defining the input parameters for the 'get_slo' tool: 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 structure of SLO data returned by the tool.
    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; }
  • Registration of the 'get_slo' tool by including its creator function in the tools array passed to the MCP server registration.
    // SLO tools createListSLOsTool(api), createGetSLOTool(api),
  • Import of the createGetSLOTool function used to instantiate and register the 'get_slo' tool.
    import { createListSLOsTool } from "./list-slos.js"; import { createGetSLOTool } from "./get-slo.js";

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