Skip to main content
Glama
dimonb

Uptrace MCP Server

by dimonb

uptrace_get_query_syntax

Access UQL syntax documentation to learn operators, functions, and patterns for querying spans, logs, and metrics in Uptrace.

Instructions

Get UQL (Uptrace Query Language) syntax documentation. Returns operators, functions, examples, and common patterns for querying spans, logs, and metrics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler implementation for 'uptrace_get_query_syntax' that calls client.get_query_syntax() and formats the response.
    elif name == "uptrace_get_query_syntax":
        logger.info("Fetching UQL query syntax documentation")
        syntax_doc = client.get_query_syntax()
    
        import json
    
        lines = [
            "# UQL (Uptrace Query Language) Syntax Documentation",
            "",
            f"**Language**: {syntax_doc.get('language', 'UQL')}",
            f"**Description**: {syntax_doc.get('description', '')}",
            "",
        ]
    
        if "basic_structure" in syntax_doc:
            lines.append("## Basic Structure")
            lines.append(f"```\n{syntax_doc['basic_structure']}\n```")
            lines.append("")
    
        if "operators" in syntax_doc:
            lines.append("## Operators")
            for category, ops in syntax_doc["operators"].items():
                lines.append(f"### {category.title()}")
                for op, desc in ops.items():
                    lines.append(f"- `{op}`: {desc}")
                lines.append("")
    
        if "functions" in syntax_doc:
            lines.append("## Functions")
  • The tool registration for 'uptrace_get_query_syntax' in the MCP server tool list.
    Tool(
        name="uptrace_get_query_syntax",
        description="Get UQL (Uptrace Query Language) syntax documentation. Returns operators, functions, examples, and common patterns for querying spans, logs, and metrics.",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
Behavior4/5

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

With no annotations provided, the description carries the full burden. It adequately discloses what the tool returns (operators, functions, examples, patterns) providing clear behavioral context that this is a documentation retrieval operation. However, it does not explicitly state safety characteristics (read-only) or cache behavior that annotations would typically cover.

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 consists of two efficient sentences with zero waste. It is front-loaded with the core action ('Get UQL...documentation') and follows with specific return value details. Every word serves a purpose in clarifying scope and content.

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

Completeness5/5

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

Given the tool has zero parameters and no output schema, the description is appropriately complete. It compensates for the missing output schema by detailing the return structure (operators, functions, examples), providing sufficient information for the agent to understand what will be returned.

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

Parameters4/5

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

The input schema contains zero parameters. Per the baseline rule for zero-parameter tools, this scores a 4. The description appropriately does not invent parameter semantics where none exist.

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 uses specific verbs ('Get', 'Returns') and clearly identifies the resource as 'UQL syntax documentation' rather than actual telemetry data. It effectively distinguishes itself from siblings like uptrace_query_metrics and uptrace_search_logs by specifying it returns documentation content (operators, functions, examples) rather than query results.

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

Usage Guidelines3/5

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

While the description implies this is a reference tool for understanding the query language, it lacks explicit guidance on when to invoke it (e.g., 'use this before constructing queries for uptrace_query_metrics') or prerequisites. The distinction from data-retrieval siblings is clear from the name and description but not explicitly stated as usage guidance.

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/dimonb/uptrace-mcp'

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