Skip to main content
Glama
OOBE-PROTOCOL

SAP MCP Server

sap_x402_calculate_cost

Calculate cost for X402 registry calls using base price, volume curve, and cumulative calls. Runs locally without chain state.

Instructions

Pure local cost calculation using SDK X402Registry.calculateCost; does not read chain state.

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)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It reveals only two traits: pure local execution and no chain state reads. It does not mention side effects, permissions, error handling, output format, or any limitations. For a tool with 4 parameters and no output schema, this is insufficient for the agent to predict tool behavior accurately.

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 is a single sentence containing only essential information: purpose, SDK method, key behavioral trait. No superfluous words or repetition. It is optimally concise and front-loaded.

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

Completeness2/5

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

Given the tool has 4 parameters and no output schema, the description is too brief. It does not explain what the output represents, how to interpret the calculated cost, or what constraints exist (e.g., valid ranges for volumeCurve). The description fails to provide enough context for an agent to use the tool effectively, especially since sibling cost tools may have different behaviors.

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 input schema already documents all 4 parameters with descriptions. The tool description adds no additional parameter-level meaning beyond the schema. Baseline score of 3 is appropriate, as the description does not compensate for low schema coverage (which is not the case here).

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 clearly states the tool performs 'pure local cost calculation' using a specific SDK method (X402Registry.calculateCost) and explicitly notes it does not read chain state. This distinctively separates it from on-chain reading siblings like sap_x402_fetch_escrow and sap_x402_estimate_cost, providing a specific verb+resource and scope.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives such as sap_x402_estimate_cost or other cost-related tools. The description implies local computation without chain reads, but does not state prerequisites, exclusions, or use cases. This omission makes it difficult for an AI agent to choose correctly among similar tools.

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