Skip to main content
Glama
sap-odata-mcp

sap-odata-mcp

by asherwalden

Query SAP data

sap_query
Read-only

Query SAP OData V2 entity sets to filter, select, order, expand, page, and count records for targeted data retrieval.

Instructions

Read records from an SAP OData V2 entity set using OData query options. Filter syntax examples: "SalesOrderType eq 'OR'", "TotalNetAmount gt 1000", "substringof('Inc', BusinessPartnerName)". Dates: "CreationDate ge datetime'2024-01-01T00:00:00'".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "service": "<service>",
      "entitySet": "<entitySet>"
    },
    "name": "sap_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMax rows (server caps this)
skipNo
countNoInclude total matching row count
expandNoNavigation properties to include, e.g. to_Item
filterNoOData V2 $filter expression
selectNoFields to return (keep it small!)
orderByNoe.g. ["CreationDate desc"]
serviceYesService name from sap_list_services
entitySetYesEntity set, e.g. A_SalesOrder

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds meaningful OData V2 context (filter expression syntax, datetime literal format), but says nothing about row caps, pagination interaction between top/skip, auth requirements, or error behavior on invalid filters.

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?

Three sentences, front-loaded with the core purpose before the syntax examples, with no filler. The examples are dense but each illustrates a distinct construct (equality, numeric comparison, substring, datetime), so they earn their place.

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

Completeness3/5

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

For a 9-parameter, annotation-light query tool with no output schema, the definition covers the trickiest input (filter) but leaves the agent without a picture of the returned shape or how top/skip/count interact with server caps. It is adequate to call correctly, but not complete for planning a paged or expanded query.

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?

Schema coverage is 89%, so the baseline is 3, and the description genuinely adds meaning on top: concrete $filter expression forms and the exact datetime literal syntax ('CreationDate ge datetime'2024-01-01T00:00:00'') that the schema only labels generically. It does not extend the other parameters, but the hardest one to get right is well covered.

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 names a specific verb and resource ('Read records from an SAP OData V2 entity set') and specifies the protocol/query dialect, which clearly separates it from sap_describe_entity_set and sap_list_services in practice. It stops short of explicitly naming those siblings as the metadata-listing alternatives, so it is clear but not fully differentiated.

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?

Usage is implied by the examples — an agent can infer this is the tool for pulling rows with a $filter/$select/$orderBy — but there is no statement of when to prefer it over sap_describe_entity_set or when a query is inappropriate. The filter/date examples function as invocation guidance rather than selection guidance.

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