Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TUSK_API_KEYYesYour API token
TUSK_DRIFT_API_URLNoTusk API URL (defaults to https://api.usetusk.ai)https://api.usetusk.ai
TUSK_DRIFT_SERVICE_IDNoService ID (auto-discovered from .tusk/config.yaml if not set)

Tools

Functions exposed to the LLM to take actions

NameDescription
query_spans

Search and filter API traffic span recordings.

Use this tool to:

  • Find specific API calls by endpoint name, HTTP method, or status code

  • Search for errors or slow requests

  • Get recent traffic for a specific endpoint

  • Debug specific API calls

Examples:

  • Find failed requests: where.name = { contains: "/api/users" }, jsonbFilters = [{ column: "outputValue", jsonPath: "$.statusCode", gte: 400, castAs: "int" }]

  • Find slow requests: where.duration = { gt: 1000 }

  • Recent traffic for endpoint: where.name = { eq: "/api/orders" }, limit = 10, orderBy = [{ field: "timestamp", direction: "DESC" }]

get_schema

Get schema and structure information for span recordings on Tusk Drift.

Use this tool to:

  • Understand what fields are available for a specific instrumentation type

  • See example payloads for HTTP requests, database queries, etc.

  • Learn what to filter on before querying spans

Common package names:

  • http: Incoming HTTP requests (has statusCode, method, url, headers)

  • fetch: Outgoing HTTP calls

  • pg: PostgreSQL queries (has db.statement, db.name)

  • grpc: gRPC calls

  • express: Express.js middleware spans

list_distinct_values

List unique values for a field, ordered by frequency.

Use this tool to:

  • Discover available endpoints (field: "name")

  • See all instrumentation packages in use (field: "packageName")

  • Find unique environments (field: "environment")

  • Explore JSONB values like status codes (field: "outputValue.statusCode")

This helps you understand what values exist before building specific queries.

aggregate_spans

Calculate aggregated metrics and statistics across spans.

Use this tool to:

  • Get latency percentiles for endpoints (p50, p95, p99)

  • Calculate error rates by endpoint

  • Get request counts over time

  • Compare performance across environments

Examples:

  • Endpoint latency: groupBy = ["name"], metrics = ["count", "avgDuration", "p95Duration"]

  • Error rates: groupBy = ["name"], metrics = ["count", "errorCount", "errorRate"]

  • Hourly trends: timeBucket = "hour", metrics = ["count", "errorRate"]

get_trace

Get all spans in a distributed trace as a hierarchical tree.

Use this tool to:

  • Debug a specific request end-to-end

  • See the full call chain from HTTP request to database queries

  • Understand timing and dependencies between spans

  • Identify bottlenecks in a request

First use query_spans to find spans, then use the traceId to get the full trace.

get_spans_by_ids

Fetch specific span recordings by their IDs.

Use this tool when you have span IDs from a previous query and need the full details including payloads.

This is useful for:

  • Getting full details for spans found via query_spans

  • Examining specific requests in detail

  • Comparing multiple specific spans

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
servicesList of available Tusk Drift services that can be queried

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/Use-Tusk/drift-mcp'

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