Skip to main content
Glama

sap_analyze_query

Analyze a natural language query to get SAP query-building guidance: candidate tables, query type, date ranges, aggregation hints, and field recommendations.

Instructions

Analyze a natural language query and return intelligent guidance for building the SAP query. This tool examines your query and returns: - Candidate tables to query - Query type (simple, multi-table, aggregation) - Detected date ranges - Aggregation hints (TOP N, SUM, COUNT) - Field recommendations with semantic context USE THIS FIRST before building complex queries to get field guidance!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language query (e.g., 'top 10 customers by sales in 2024')
fetch_metadataNoIf true, also fetch and classify field metadata for identified tables (default: true)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.1.2

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does frame the tool as analytical and non-mutating by saying it 'examines your query and returns' guidance rather than executing anything. However, it does not explicitly state read-only behavior, metadata-fetching behavior beyond the fetch_metadata parameter, or any limitations or failure traits.

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

Conciseness4/5

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

The description is well structured: a lead sentence, a bulleted return-value list, and a clear usage call-out. It is slightly redundant ('Analyze... return' and 'This tool examines... and returns' say the same thing), but every section earns its place and the information is easy to scan.

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?

Since there is no output schema, the description compensates by listing the major output categories an agent can expect. It also gives an ordering hint ('USE THIS FIRST') that orients the agent in the broader workflow. It does not fully specify the exact result structure or route to related tools like sap_smart_table_query, but it is sufficient for invoking this tool correctly.

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 (query and fetch_metadata). The description adds little beyond the schema: it references natural-language queries generally but does not explain fetch_metadata or how parameters affect the returned guidance. Baseline 3 applies due to high schema coverage.

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

Purpose4/5

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

The description clearly names the action ('Analyze a natural language query') and the resource (the query), then enumerates specific outputs: candidate tables, query type, date ranges, aggregation hints, and field recommendations. It does not explicitly contrast itself with similar sibling tools like sap_smart_table_query, but the purpose is unambiguous.

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

Usage Guidelines4/5

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

The description provides an explicit usage directive: 'USE THIS FIRST before building complex queries to get field guidance!' This tells an agent when to invoke it. It does not, however, name alternative tools or state when not to use it, so it lacks complete routing/exclusion guidance.

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

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/NicoHern/abapilot-mcp'

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