Skip to main content
Glama
OOBE-PROTOCOL

SAP MCP Server

Calculate SAP x402 Cost

sap_x402_calculate_cost

Calculate cost for X402 registry calls using volume pricing curves. Estimate total cost before escrow creation or settlement in SAP payment flow.

Instructions

Pure local cost calculation using SDK X402Registry.calculateCost; does not read chain state. SAP MCP context: Payment and settlement flow. Estimate or fetch state before creating escrows or settling calls; write operations require an enabled signer mode and MCP policy approval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callsNoNumber of calls to calculate
basePriceNoBase price per call in token base units
volumeCurveNoArray of { afterCalls, pricePerCall } pricing breakpoints
totalCallsBeforeNoCumulative settled calls before this calculation (default: 0)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesMCP content blocks returned to the caller.
isErrorNoTrue when the tool result represents an application-level error.
Behavior1/5

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

Annotation contradiction: readOnlyHint=false conflicts with description stating 'Pure local cost calculation; does not read chain state,' implying a read-only pure function. This inconsistency undermines trust in behavioral accuracy.

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?

Three compact sentences: core purpose, flow context, and usage advice. No wasted words, front-loaded with the most critical information.

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?

Given the annotation contradiction, the agent cannot reliably determine side effects. Output schema exists (not shown) so return values are covered. The description provides flow context but the contradiction is a critical gap.

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 provides 100% description coverage for all 4 parameters. Description adds no additional parameter detail beyond the schema, so baseline score of 3 is appropriate.

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?

Description clearly states the tool performs a local cost calculation using SDK X402Registry.calculateCost and does not read chain state. This verb-resource pair is specific and distinguishes from siblings like sap_x402_estimate_cost.

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?

Description provides clear context: it flows in 'Payment and settlement flow' and should be used 'before creating escrows or settling calls.' It also hints at prerequisites (signer mode, policy) for subsequent write ops, but does not explicitly exclude alternatives or state when not to use.

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/OOBE-PROTOCOL/sap-mcp'

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