Skip to main content
Glama

Last Price

compute_price

Compute a price. Returns the price, the function that produced it, the metered cost and a trace of each stage. Send currency plus unit_cost (what the work costs you) or current_price. Missing inputs return an error naming them. For a competitor offer, put competitor_price, competitor_currency and competitive_action in metadata. To pay for this one call with x402, pass payment (call without it to read the price). A result with valid_until (RFC 3339) holds only until then. confidence is the function's own 0 to 1 score for its price, not a probability that a buyer accepts. price_statement says what the answer is: a third party's estimate for you, or the workspace's commitment when a signed quote is attached.

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": {
      "currency": "<currency>"
    },
    "name": "compute_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
geoNoOptional geography hint, e.g. US.
payerNoOptional. Who pays, as distinct from who calls: an agent wallet, a person by card, or a company billed later.
intentNoOptional. The spending limit the buyer approved, e.g. a card network mandate. The result says whether the price fits it.
channelNoOptional. The sales channel, e.g. an agent marketplace. With a rate saved by set_channel_rates, the price covers the channel's cut.
paymentNoOptional. The signed x402 payment, base64, as sent in an X-PAYMENT or PAYMENT-SIGNATURE header; or, where the answer offers MPP tempo, the whole Payment-Authorization value ("Payment " and the credential). Omit it to read what the call costs and how to pay; nothing is charged until you send it.
routingNoOptional. Which functions may answer this call, by UUID from list_functions. If none qualifies, the call is refused before any charge.
currencyYesThree-letter ISO currency code, e.g. USD.
metadataNoOptional context. Competitive pricing: competitor_price, competitor_currency and competitive_action (match, or undercut with undercut_pct); confirm the products are comparable. Or market_query (the job in plain words) to look up market prices instead.
max_priceNoOptional maximum acceptable price.
min_priceNoOptional minimum acceptable price. A competitive offer needs this or a declared unit_cost and target_margin_pct.
unit_costNoWhat the work costs you. It lets lastprice/cost-plus price with no current_price, which is the usual case when pricing a task you are about to run. Routing picks a function that can use it; to require cost-plus, pass its UUID from list_functions as function_id.
buyer_typeNoOptional. Who the price is for: an AI agent or a person. Recorded with the quote only.
no_exploreNoIf true, give this price exactly as computed, without the small per-call variation a workspace may run so learned pricing can learn what buyers will pay (see get_price_exploration).
product_idNoOptional identifier of what is being priced.
buyer_agentNoOptional. The buying agent, e.g. chatgpt. A label recorded with the quote only.
function_idNoOptional explicit pricing function UUID to use.
product_typeNoOptional category. Defaults to "custom".
buyer_ceilingNoOptional. The most the buyer says it will pay, in the request currency (its budget, spend limit or offer cap). Never reaches the pricing function, so it cannot set the price; the model layer reads it as evidence about the buyer and checks it against what the buyer then does. Echoed in price_object.evidence.declared_ceiling.
current_priceNoThe current or reference price. Optional: functions that price relative to an incumbent need it, but lastprice/cost-plus prices from unit_cost instead.
outcome_termsNoOptional, for a price charged per outcome: when the outcome counts as failed and what is owed then. The result echoes the terms normalised, with complete false until success_definition, resolve_by and on_timeout are all set.
idempotency_keyNoOptional. A new value (e.g. a UUID) for each call you mean to make; send the SAME value if you retry after a timeout or error you cannot interpret, and the call is computed and charged once. Ignored without a credential.
learned_routingNoOptional. With routing_preference cheapest, fastest, round_robin or weighted, let the router learn from your own calls which function serves you best (see get_learned_routing). Ignored with a function_id.
customer_segmentNoOptional segment, e.g. enterprise.
target_margin_pctNoMargin on price for cost-plus, not markup on cost: price = unit_cost / (1 - margin). Defaults to 30.
routing_preferenceNoHow to route across pricing functions. Defaults to "default".
include_explanationNoIf true, ask for an explanation and confidence with the price.
include_buyer_envelopeNoIf true, with metadata.category set, the result adds buyer_envelope: what buyers' spend limits allowed in that category (pooled over 5 or more buyers) and where this price sits. It never changes the price.

Output Schema

NameRequiredDescriptionDefault
kindNoWhat sort of claim the price is: an estimate by a pricing function, advice rather than a commitment. Term: lp:price-kind.computed.
messageNoA short sentence about the result that an agent can show its person.
receiptNoThe usage event that records this call. Pass receipt.id to report_outcome only when it differs from request_id; when no usage event was recorded, receipt.id falls back to request_id and there is nothing to report against. Term: lp:usage-event.
currencyNoISO 4217 code of computed_price.
confidenceNoThe function's own 0 to 1 score for this price; not a probability that a buyer accepts. Term: lp:confidence.quote.
request_idNoThis call's id; the receipt id unless receipt.id says otherwise.
explanationNoWhy the function chose this price, in plain words; null when it gave none.
function_idNoThe pricing function that produced the price. Term: lp:pricing-function.
valid_untilNoRFC 3339; the price holds only until then.
alternativesNoOther prices the function considered, each with its confidence and a label.
price_objectNoWhat the price means beside the number: the expected acceptance at each price, the range it was chosen in, what it was conditioned on, the evidence behind it, what it cost to compute and whether it was an exploring draw. Term: lp:price-object.
function_nameNoIts name, such as lastprice/cost-plus. Term: lp:pricing-function.
computed_priceNoThe price the function returned, after the caller's bounds and the workspace's guardrails. Term: lp:computed-price.
price_statementNoWhat this answer is: a third party's estimate for you (standing estimate), or the workspace's commitment until valid_until when a signed quote is attached (speaker seller, standing commitment). Term: lp:price-statement.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / buyer_ceiling
      Added value: +{
      +  "description": "Optional. The most the buyer says it will pay, in the request currency (its budget, spend limit or offer cap). Never reaches the pricing function, so it cannot set the price; the model layer reads it as evidence about the buyer and checks it against what the buyer then does. Echoed in price_object.evidence.declared_ceiling.",
      +  "exclusiveMinimum": 0,
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / alternatives / description
      Added value: +"Other prices the function considered, each with its confidence and a label."
    • addedOutput schema / properties / currency / description
      Added value: +"ISO 4217 code of computed_price."
    • addedOutput schema / properties / explanation / description
      Added value: +"Why the function chose this price, in plain words; null when it gave none."
    • addedOutput schema / properties / kind
      Added value: +{
      +  "description": "What sort of claim the price is: an estimate by a pricing function, advice rather than a commitment. Term: lp:price-kind.computed.",
      +  "enum": [
      +    "computed"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / message / description
      Added value: +"A short sentence about the result that an agent can show its person."
    • addedOutput schema / properties / price_object
      Added value: +{
      +  "description": "What the price means beside the number: the expected acceptance at each price, the range it was chosen in, what it was conditioned on, the evidence behind it, what it cost to compute and whether it was an exploring draw. Term: lp:price-object.",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / price_statement
      Added value: +{
      +  "description": "What this answer is: a third party's estimate for you (standing estimate), or the workspace's commitment until valid_until when a signed quote is attached (speaker seller, standing commitment). Term: lp:price-statement.",
      +  "properties": {
      +    "audience": {
      +      "enum": [
      +        "public",
      +        "one_counterparty",
      +        "private"
      +      ],
      +      "type": "string"
      +    },
      +    "interval_meaning": {
      +      "enum": [
      +        "credible_interval",
      +        "evidence_spread",
      +        "acceptance_range",
      +        "negotiation_room"
      +      ],
      +      "type": "string"
      +    },
      +    "speaker": {
      +      "enum": [
      +        "seller",
      +        "buyer",
      +        "both",
      +        "third_party",
      +        "market"
      +      ],
      +      "type": "string"
      +    },
      +    "standing": {
      +      "enum": [
      +        "proposal",
      +        "commitment",
      +        "executed",
      +        "estimate",
      +        "constraint"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "speaker",
      +    "standing",
      +    "audience"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / request_id / description
      Added value: +"This call's id; the receipt id unless receipt.id says otherwise."
  2. Changed11 schema fields changed
    • addedOutput schema / properties / alternatives
      Added value: +{
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / computed_price / description
      Added value: +"The price the function returned, after the caller's bounds and the workspace's guardrails. Term: lp:computed-price."
    • addedOutput schema / properties / confidence / description
      Added value: +"The function's own 0 to 1 score for this price; not a probability that a buyer accepts. Term: lp:confidence.quote."
    • addedOutput schema / properties / confidence / maximum
      Added value: +1
    • addedOutput schema / properties / confidence / minimum
      Added value: +0
    • changedOutput schema / properties / confidence / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • addedOutput schema / properties / explanation
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / function_id
      Added value: +{
      +  "description": "The pricing function that produced the price. Term: lp:pricing-function.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / function_name
      Added value: +{
      +  "description": "Its name, such as lastprice/cost-plus. Term: lp:pricing-function.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / receipt
      Added value: +{
      +  "description": "The usage event that records this call. Pass receipt.id to report_outcome only when it differs from request_id; when no usage event was recorded, receipt.id falls back to request_id and there is nothing to report against. Term: lp:usage-event.",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / valid_until
      Added value: +{
      +  "description": "RFC 3339; the price holds only until then.",
      +  "type": "string"
      +}
  3. Changed11 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / buyer_agent / description
      Previous value: -"Optional. The buying agent, e.g. chatgpt or agent.example.com. A label recorded with the quote only (while its release flag is on); never sent to the pricing function."New value: +"Optional. The buying agent, e.g. chatgpt. A label recorded with the quote only."
    • changedInput schema / properties / channel / description
      Previous value: -"Optional. The sales channel the price is for, such as a shopping agent or an agent marketplace. When your workspace saved a rate for it with set_channel_rates and channel pricing is on, the price is raised so you keep the same amount after the channel's cut."New value: +"Optional. The sales channel, e.g. an agent marketplace. With a rate saved by set_channel_rates, the price covers the channel's cut."
    • changedInput schema / properties / include_buyer_envelope / description
      Previous value: -"If true, and metadata.category names a category, the result carries buyer_envelope: what buyers' own spend checks allowed in that category (p25 to p75, the median, and how often checks were refused over a limit, pooled over 5 or more buyer workspaces; no numbers below 5) and where this price sits. A limit, not a valuation: it never changes the price. Where it is not switched on for the workspace it is ignored."New value: +"If true, with metadata.category set, the result adds buyer_envelope: what buyers' spend limits allowed in that category (pooled over 5 or more buyers) and where this price sits. It never changes the price."
    • changedInput schema / properties / intent / description
      Previous value: -"Optional. The spending limit the buyer approved, such as a card network or payment rail mandate. Where this is switched on for the workspace, the result says whether the price fits it, with the reasons when not, and a signed quote binds the same so an issuer or buyer can check it."New value: +"Optional. The spending limit the buyer approved, e.g. a card network mandate. The result says whether the price fits it."
    • changedInput schema / properties / learned_routing / description
      Previous value: -"Optional. With routing_preference cheapest, fastest, round robin or weighted, let the router learn which of the functions that strategy chooses from serves your workspace best (from your own routed calls), falling back to the strategy while there is too little data. Ignored for any other preference or a function_id, and until learned routing is released for your workspace. get_learned_routing with strategy shows what it learned."New value: +"Optional. With routing_preference cheapest, fastest, round_robin or weighted, let the router learn from your own calls which function serves you best (see get_learned_routing). Ignored with a function_id."
    • changedInput schema / properties / metadata / description
      Previous value: -"Optional context. For competitive pricing: competitor_price, competitor_currency and competitive_action (match or undercut); undercut requires undercut_pct. Confirm product comparability before calling. Or send market_query (the job, in plain words) instead of competitor_price: where market prices are switched on, the market is looked up first and the answer carries market_prices (low, median, high and the pages); with competitive_action and no competitor_price, the lowest market price is used to undercut and the median to match (market_reference: low, median or high chooses)."New value: +"Optional context. Competitive pricing: competitor_price, competitor_currency and competitive_action (match, or undercut with undercut_pct); confirm the products are comparable. Or market_query (the job in plain words) to look up market prices instead."
    • changedInput schema / properties / outcome_terms / description
      Previous value: -"Optional, for a price charged per outcome. When the outcome counts as failed and what is owed then. Where outcome terms are switched on for the workspace, the result carries outcome_terms: these terms normalised, the deadline as a time, the amount owed on timeout, and which terms are missing (complete is false without success_definition, resolve_by and on_timeout). Sending it marks the price as an outcome price; so does metadata.unit \"outcome\"."New value: +"Optional, for a price charged per outcome: when the outcome counts as failed and what is owed then. The result echoes the terms normalised, with complete false until success_definition, resolve_by and on_timeout are all set."
    • changedInput schema / properties / payer / description
      Previous value: -"Optional. Who pays, as distinct from who calls: the agent from its own wallet, a person by card, or a company billed later. Where this is switched on it reaches buyer-aware pricing as metadata.payer and the answer echoes it."New value: +"Optional. Who pays, as distinct from who calls: an agent wallet, a person by card, or a company billed later."
    • changedInput schema / properties / routing / description
      Previous value: -"Optional. Which functions may answer this one call, by UUID from list_functions. A call these leave with no function is refused, naming why, before anything runs or is charged. Where routing preferences are not yet on for your workspace they are ignored."New value: +"Optional. Which functions may answer this call, by UUID from list_functions. If none qualifies, the call is refused before any charge."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "computed_price": {
      +      "type": "number"
      +    },
      +    "confidence": {
      +      "type": "number"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "request_id": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Changed5 schema fields changed
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "Optional. The spending limit the buyer approved, such as a card network or payment rail mandate. Where this is switched on for the workspace, the result says whether the price fits it, with the reasons when not, and a signed quote binds the same so an issuer or buyer can check it.",
      +  "properties": {
      +    "currency": {
      +      "description": "Three-letter ISO code. Defaults to the price currency.",
      +      "maxLength": 3,
      +      "minLength": 3,
      +      "type": "string"
      +    },
      +    "expires_at": {
      +      "description": "When the approval stops being valid (RFC 3339).",
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "The approval id from the rail or issuer.",
      +      "maxLength": 200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "max_amount": {
      +      "description": "The most the buyer approved.",
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "merchant": {
      +      "description": "The merchant the approval names. Carried into the quote as sent.",
      +      "maxLength": 253,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "max_amount"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / metadata / description
      Previous value: -"Optional context. For competitive pricing: competitor_price, competitor_currency and competitive_action (match or undercut); undercut requires undercut_pct. Confirm product comparability before calling."New value: +"Optional context. For competitive pricing: competitor_price, competitor_currency and competitive_action (match or undercut); undercut requires undercut_pct. Confirm product comparability before calling. Or send market_query (the job, in plain words) instead of competitor_price: where market prices are switched on, the market is looked up first and the answer carries market_prices (low, median, high and the pages); with competitive_action and no competitor_price, the lowest market price is used to undercut and the median to match (market_reference: low, median or high chooses)."
    • addedInput schema / properties / payer
      Added value: +{
      +  "description": "Optional. Who pays, as distinct from who calls: the agent from its own wallet, a person by card, or a company billed later. Where this is switched on it reaches buyer-aware pricing as metadata.payer and the answer echoes it.",
      +  "enum": [
      +    "agent_wallet",
      +    "person_card",
      +    "company_invoice",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / payment / description
      Previous value: -"Optional. The signed x402 payment, base64, as sent in an X-PAYMENT or PAYMENT-SIGNATURE header. Omit it to read what the call costs and how to pay; nothing is charged until you send it."New value: +"Optional. The signed x402 payment, base64, as sent in an X-PAYMENT or PAYMENT-SIGNATURE header; or, where the answer offers MPP tempo, the whole Payment-Authorization value (\"Payment \" and the credential). Omit it to read what the call costs and how to pay; nothing is charged until you send it."
    • addedInput schema / properties / routing
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional. Which functions may answer this one call, by UUID from list_functions. A call these leave with no function is refused, naming why, before anything runs or is charged. Where routing preferences are not yet on for your workspace they are ignored.",
      +  "properties": {
      +    "allow_fallbacks": {
      +      "description": "false: fail instead of trying another function when the chosen one fails.",
      +      "type": "boolean"
      +    },
      +    "excluded_functions": {
      +      "description": "These may not answer, not even as a fallback.",
      +      "items": {
      +        "format": "uuid",
      +        "type": "string"
      +      },
      +      "maxItems": 50,
      +      "type": "array"
      +    },
      +    "max_cost_per_unit": {
      +      "description": "Most you will pay per metered unit (rate x multiplier).",
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "max_latency_ms": {
      +      "description": "Skip functions slower than this on average, and stop waiting after it.",
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "only_functions": {
      +      "description": "Only these may answer.",
      +      "items": {
      +        "format": "uuid",
      +        "type": "string"
      +      },
      +      "maxItems": 50,
      +      "minItems": 1,
      +      "type": "array"
      +    },
      +    "preferred_functions": {
      +      "description": "Tried first, in this order.",
      +      "items": {
      +        "format": "uuid",
      +        "type": "string"
      +      },
      +      "maxItems": 50,
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / properties / include_buyer_envelope
      Added value: +{
      +  "description": "If true, and metadata.category names a category, the result carries buyer_envelope: what buyers' own spend checks allowed in that category (p25 to p75, the median, and how often checks were refused over a limit, pooled over 5 or more buyer workspaces; no numbers below 5) and where this price sits. A limit, not a valuation: it never changes the price. Where it is not switched on for the workspace it is ignored.",
      +  "type": "boolean"
      +}
  6. Changed8 schema fields changed
    • addedInput schema / properties / buyer_agent
      Added value: +{
      +  "description": "Optional. The buying agent, e.g. chatgpt or agent.example.com. A label recorded with the quote only (while its release flag is on); never sent to the pricing function.",
      +  "maxLength": 100,
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / buyer_type
      Added value: +{
      +  "description": "Optional. Who the price is for: an AI agent or a person. Recorded with the quote only.",
      +  "enum": [
      +    "agent",
      +    "person",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / channel
      Added value: +{
      +  "description": "Optional. The sales channel the price is for, such as a shopping agent or an agent marketplace. When your workspace saved a rate for it with set_channel_rates and channel pricing is on, the price is raised so you keep the same amount after the channel's cut.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Optional. A new value (e.g. a UUID) for each call you mean to make; send the SAME value if you retry after a timeout or error you cannot interpret, and the call is computed and charged once. Ignored without a credential.",
      +  "maxLength": 255,
      +  "minLength": 8,
      +  "type": "string"
      +}
    • addedInput schema / properties / learned_routing
      Added value: +{
      +  "description": "Optional. With routing_preference cheapest, fastest, round robin or weighted, let the router learn which of the functions that strategy chooses from serves your workspace best (from your own routed calls), falling back to the strategy while there is too little data. Ignored for any other preference or a function_id, and until learned routing is released for your workspace. get_learned_routing with strategy shows what it learned.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / no_explore
      Added value: +{
      +  "description": "If true, give this price exactly as computed, without the small per-call variation a workspace may run so learned pricing can learn what buyers will pay (see get_price_exploration).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / outcome_terms
      Added value: +{
      +  "description": "Optional, for a price charged per outcome. When the outcome counts as failed and what is owed then. Where outcome terms are switched on for the workspace, the result carries outcome_terms: these terms normalised, the deadline as a time, the amount owed on timeout, and which terms are missing (complete is false without success_definition, resolve_by and on_timeout). Sending it marks the price as an outcome price; so does metadata.unit \"outcome\".",
      +  "properties": {
      +    "evidence": {
      +      "description": "What proves the outcome, e.g. [\"delivery_receipt\"].",
      +      "items": {
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    "on_timeout": {
      +      "description": "What is owed when the deadline passes without success.",
      +      "enum": [
      +        "no_charge",
      +        "partial",
      +        "full"
      +      ],
      +      "type": "string"
      +    },
      +    "resolve_by": {
      +      "description": "The deadline: an ISO 8601 duration from the quote (P30D, PT48H) or an RFC 3339 time. After it, with no success, the outcome has failed.",
      +      "type": "string"
      +    },
      +    "success_definition": {
      +      "description": "What the buyer must see for the outcome to count.",
      +      "maxLength": 500,
      +      "type": "string"
      +    },
      +    "timeout_share": {
      +      "description": "With on_timeout \"partial\": the fraction of the price owed, e.g. 0.3 for 30%.",
      +      "exclusiveMaximum": 1,
      +      "exclusiveMinimum": 0,
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / payment
      Added value: +{
      +  "description": "Optional. The signed x402 payment, base64, as sent in an X-PAYMENT or PAYMENT-SIGNATURE header. Omit it to read what the call costs and how to pay; nothing is charged until you send it.",
      +  "maxLength": 8192,
      +  "minLength": 20,
      +  "type": "string"
      +}
  7. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description explains charging semantics: nothing is charged until payment is sent, idempotency_key enables safe retry after ambiguous errors, valid_until limits how long a result holds, and missing inputs produce a named error. These details materially help an agent invoke a non-read-only, non-idempotent tool safely.

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 purpose and return summary are front-loaded, followed by conditional guidance. It is a dense single paragraph, but nearly every sentence carries distinct invocation or behavioral information relevant to this complex tool.

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?

For a 27-parameter tool with an output schema, the description covers the main pricing modes, error behavior, payment flow, result validity, and confidence/price_statement semantics. The remaining parameter details are well handled by the schema and annotations.

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 description coverage is already 100%, so the baseline is 3. The description adds meaningful relationships among unit_cost, current_price, target_margin_pct, competitor metadata, and payment, and clarifies confidence and price_statement beyond field-level definitions.

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 states a specific verb and resource ('Compute a price') and enumerates the returned values, so the core purpose is clear. It does not explicitly distinguish this from sibling tools such as verify_price or pricing_conversation, so sibling differentiation is missing.

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?

It gives clear invocation context: send currency with unit_cost or current_price, use metadata for competitor offers, omit payment to read the price, and expect missing inputs to error. It lacks explicit when-not-to-use guidance or direct comparison to sibling pricing tools, but the operating context is well established.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources