Last Price
Compute and verify prices from an agent, metered per call. Works keyless on a demo tenant.
Should I use this
Quality & Safety
Findings (1)
- LOWin verify_price
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"pricing": {
"url": "https://api.last-price.ai/api/mcp/rpc"
}
}
}Remote endpoints
https://api.last-price.ai/api/mcp/rpcstreamable-httpWhat it can do
Tool inventory
Tools (21)
🟡pricing_conversation(action, request, answers)
Ask Last Price what pricing inputs are missing. Start with request: {}, return its questions to the caller, then send continuation.request and answers. Prepare is free and does not compute. When ready, action compute uses the existing authenticated pricing API; configure a credential first. Never invent answers or treat a continuation as authorization.
Input Schema
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"prepare",
"compute"
],
"default": "prepare"
},
"request": {
"type": "object",
"description": "Partial REST PricingComputeRequest, including nested context, constraints, an explicit function selection and options. Reuse continuation.request on subsequent calls."
},
"answers": {
"type": "object",
"additionalProperties": false,
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"current_price": {
"type": "number",
"minimum": 0
},
"unit_cost": {
"type": "number",
"minimum": 0
},
"target_margin_pct": {
"type": "number",
"minimum": 0,
"maximum": 95
},
"min_price": {
"type": "number",
"minimum": 0
},
"max_price": {
"type": "number",
"minimum": 0
}
}
}
},
"additionalProperties": false
}🟡compute_price(product_id, product_type, current_price, unit_cost, target_margin_pct, ...)
Compute a price for a product/context via the Last Price Pricing Compute Network. Returns the computed price, the function that produced it, token metering/cost, and a `trace` listing each stage the request passed through (cache, route, execute, fallback, constrain, meter). For a competitor offer, put competitor_price, competitor_currency and competitive_action in metadata, then supply min_price or unit_cost with target_margin_pct. Missing business inputs return an error naming them.
Input Schema
{
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "Optional identifier of what is being priced."
},
"product_type": {
"type": "string",
"enum": [
"saas",
"ecommerce",
"marketplace",
"digital",
"api",
"custom"
],
"description": "Optional category. Defaults to \"custom\"."
},
"current_price": {
"type": "number",
"minimum": 0,
"description": "The current or reference price. Optional: functions that price relative to an incumbent need it, but lastprice/cost-plus prices from unit_cost instead."
},
"unit_cost": {
"type": "number",
"minimum": 0,
"description": "What 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."
},
"target_margin_pct": {
"type": "number",
"minimum": 0,
"maximum": 95,
"description": "Margin on price for cost-plus, not markup on cost: price = unit_cost / (1 - margin). Defaults to 30."
},
"min_price": {
"type": "number",
"minimum": 0,
"description": "Optional minimum acceptable price. A competitive offer needs this or a declared unit_cost and target_margin_pct."
},
"max_price": {
"type": "number",
"minimum": 0,
"description": "Optional maximum acceptable price."
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Three-letter ISO currency code, e.g. USD."
},
"customer_segment": {
"type": "string",
"description": "Optional segment, e.g. enterprise."
},
"geo": {
"type": "string",
"description": "Optional geography hint, e.g. US."
},
"routing_preference": {
"type": "string",
"enum": [
"cheapest",
"fastest",
"explicit",
"round_robin",
"weighted",
"policy",
"default"
],
"description": "How to route across pricing functions. Defaults to \"default\"."
},
"function_id": {
"type": "string",
"format": "uuid",
"description": "Optional explicit pricing function UUID to use."
},
"include_explanation": {
"type": "boolean",
"description": "If true, ask for an explanation and confidence with the price."
},
"metadata": {
"type": "object",
"description": "Optional context. For competitive pricing: competitor_price, competitor_currency and competitive_action (match or undercut); undercut requires undercut_pct. Confirm product comparability before calling."
}
},
"required": [
"currency"
]
}⚪verify_price(proposed_price, currency, product_id, product_type, current_price, ...)
Ask whether a price makes sense for its context, rather than what the price should be. Returns a verdict (fair, too_high, too_low, or unknown), the band it was judged against, a signed deviation from the reference, a confidence, and the evidence behind it. A verdict of "unknown" means the price could not be judged, which is not the same as fair.
Input Schema
{
"type": "object",
"properties": {
"proposed_price": {
"type": "number",
"minimum": 0,
"description": "The price to judge. This is the subject of the call."
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Three-letter ISO currency code, e.g. USD. Defaults to USD."
},
"product_id": {
"type": "string",
"description": "Optional identifier of what is being priced."
},
"product_type": {
"type": "string",
"enum": [
"saas",
"ecommerce",
"marketplace",
"digital",
"api",
"custom"
],
"description": "Optional category of what is being priced."
},
"current_price": {
"type": "number",
"minimum": 0,
"description": "Optional incumbent price. Not required: asking whether a price is sensible does not presuppose an existing one."
},
"customer_segment": {
"type": "string",
"description": "Optional segment, e.g. enterprise."
},
"geo": {
"type": "string",
"description": "Optional geography hint, e.g. US."
},
"min_price": {
"type": "number",
"minimum": 0,
"description": "Optional hard floor. Binding: a verdict will never relax it."
},
"max_price": {
"type": "number",
"minimum": 0,
"description": "Optional hard ceiling. Binding: a verdict will never relax it."
},
"metadata": {
"type": "object",
"description": "Optional free-form context."
}
},
"required": [
"proposed_price"
]
}🟢list_functions
List the pricing functions registered for the authenticated tenant.
Input Schema
{
"type": "object",
"properties": {}
}⚪browse_catalog
Browse the public marketplace catalog of pricing functions.
Input Schema
{
"type": "object",
"properties": {}
}🟢report_outcome(usage_event_id, outcome, quality_score, evidence_reference, evidence_url, ...)
Report whether a price from compute_price was used. Pass receipt.id from that result as usage_event_id. Outcomes are what later routing and confidence learn from. With outcome pricing on, a rejection within the call's outcome window gives back part of what it cost; the result says what was refunded. Needs a Last Price credential. Report only what actually happened.
Input Schema
{
"type": "object",
"properties": {
"usage_event_id": {
"type": "string",
"description": "The usage event of the priced call: receipt.id on the compute_price result."
},
"outcome": {
"type": "string",
"enum": [
"accepted",
"rejected"
],
"description": "Whether the price was used."
},
"quality_score": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Optional: how good the price was, 0 to 1."
},
"evidence_reference": {
"type": "string",
"maxLength": 200,
"description": "Optional evidence: an order, ticket or invoice id in your own system."
},
"evidence_url": {
"type": "string",
"maxLength": 500,
"description": "Optional evidence: an https link to the record."
},
"evidence_note": {
"type": "string",
"maxLength": 500,
"description": "Optional evidence: a short note on why."
}
},
"required": [
"usage_event_id",
"outcome"
]
}🟡get_price_guardrails
Read the price guardrails saved for your workspace, and the defaults set_price_guardrails fills in for an omitted field. saved is false when none are saved, and then no workspace limit applies. Needs a Last Price credential with routing read scope.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}🟡set_price_guardrails(band_lower_ratio, band_upper_ratio, max_change_pct, min_margin_pct, never_below_cost)
Save the price guardrails for your workspace. max_change_pct, min_margin_pct and never_below_cost hold every final price your workspace is given, from compute_price and every other pricing call. band_lower_ratio and band_upper_ratio are only the range the optimizer and elasticity functions search when a call sends no minimum or maximum. This replaces the whole saved set: an omitted field takes its default, so read get_price_guardrails first and send every rule you want to keep. Needs a Last Price credential with routing write scope.
Input Schema
{
"type": "object",
"properties": {
"band_lower_ratio": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1,
"default": 0.5,
"description": "Lowest price the optimizer and elasticity functions search, as a multiple of the current price. Defaults to 0.5."
},
"band_upper_ratio": {
"type": "number",
"minimum": 1,
"maximum": 100,
"default": 2,
"description": "Highest price the optimizer and elasticity functions search, as a multiple of the current price. Defaults to 2."
},
"max_change_pct": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"maximum": 1000,
"default": null,
"description": "Most a final price may move from the current price, up or down, in percent. Null (the default) for no limit."
},
"min_margin_pct": {
"type": [
"number",
"null"
],
"minimum": 0,
"exclusiveMaximum": 100,
"default": null,
"description": "Least margin over the unit cost a call sends, in percent of the price. Null (the default) for no minimum."
},
"never_below_cost": {
"type": "boolean",
"default": true,
"description": "Never price below the unit cost a call sends. Defaults to true."
}
},
"additionalProperties": false
}🟢get_pricing_analysis
Read what your workspace's own records say about its pricing, as findings, most urgent first: learned estimates ready while learned pricing is off, estimates that cannot be used yet and exactly what each needs, whether enough quotes have a reported outcome, how often your guardrails held prices back, and approvals waiting or about to expire. Each finding states its numbers and names the call that would act on it; nothing is changed. Free, and computed without an AI model. Needs a Last Price credential with routing read scope.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}🟢get_function(function_id)
Read one pricing function your workspace can use: its name, description, status, tags, cost per unit, cost multiplier, and input and output schemas. Its owner also sees whether a credential is saved for it. Needs a Last Price credential with function read scope.
Input Schema
{
"type": "object",
"properties": {
"function_id": {
"type": "string",
"format": "uuid",
"description": "The pricing function UUID: id on a list_functions result."
}
},
"required": [
"function_id"
],
"additionalProperties": false
}🟡update_function(function_id, display_name, description, status, tags, ...)
Change a pricing function your workspace owns: its display name, description, status, tags, cost per unit or cost multiplier. Only the fields you send change. Built-in functions and other workspaces' functions cannot be changed. The endpoint, its credential and the schemas are not changed here. Needs a Last Price credential with function publish scope.
Input Schema
{
"type": "object",
"properties": {
"function_id": {
"type": "string",
"format": "uuid",
"description": "The pricing function UUID: id on a list_functions result."
},
"display_name": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "The name people and agents see."
},
"description": {
"type": [
"string",
"null"
],
"maxLength": 2048,
"description": "What the function does. Null clears it."
},
"status": {
"type": "string",
"enum": [
"draft",
"review",
"active",
"inactive",
"deprecated"
],
"description": "active functions are routed to; draft, review, inactive and deprecated ones are not."
},
"tags": {
"type": "array",
"items": {
"type": "string",
"maxLength": 64
},
"maxItems": 20,
"description": "Replaces the whole tag list."
},
"cost_per_unit": {
"type": "number",
"minimum": 0,
"description": "What one call to the function costs, in USD."
},
"cost_multiplier": {
"type": "number",
"minimum": 0.0001,
"maximum": 100,
"description": "Multiplies the cost of each call, for a more expensive model tier. 1 is the default; stored to 4 decimal places."
}
},
"required": [
"function_id"
],
"additionalProperties": false
}🟢get_billing_settings
Read your workspace's prepaid balance and billing settings: the balance in USDC, whether balance billing and outcome pricing are on, the auto top-up offer, the latest ledger rows and the terms. Needs a Last Price credential with price compute scope.
Input Schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}🟡update_billing_settings(outcome_pricing, balance_billing, auto_topup)
Change your workspace's billing settings. Only the settings you send change. outcome_pricing turns on paying in full only when a price is used: a rejection reported with report_outcome within its window gives part back. balance_billing makes every compute call draw on the prepaid balance, and a call the balance cannot cover is refused. auto_topup is an offer, not a charge: below the threshold, results carry a top-up hint and nothing is paid automatically. A self-registered agent workspace cannot change outcome_pricing or balance_billing until it is claimed. Needs a Last Price credential with price compute scope; a person also needs the owner, admin or billing role.
Input Schema
{
"type": "object",
"properties": {
"outcome_pricing": {
"type": "boolean",
"description": "Turn outcome pricing on or off."
},
"balance_billing": {
"type": "boolean",
"description": "Turn balance billing on or off."
},
"auto_topup": {
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to offer a top-up below the threshold."
},
"threshold_usdc": {
"type": [
"string",
"number"
],
"maxLength": 32,
"minimum": 0,
"description": "Offer a top-up when the balance falls below this many USDC, e.g. \"5\"."
},
"amount_usdc": {
"type": [
"string",
"number"
],
"maxLength": 32,
"minimum": 0,
"description": "How many USDC to offer, e.g. \"25\". At least the minimum top-up."
}
},
"required": [
"enabled",
"threshold_usdc",
"amount_usdc"
],
"additionalProperties": false,
"description": "The auto top-up offer, or null to clear it."
}
},
"additionalProperties": false
}🟢list_outcomes(status, limit)
Read your workspace's outcome pricing: whether it is on, its terms, counts of open, accepted and rejected windows with the total refunded, and the windows themselves, newest first. Needs a Last Price credential with price compute scope.
Input Schema
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"open",
"decided"
],
"description": "Only open windows, or only decided ones. Both by default."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200,
"description": "Most windows to return. Defaults to 50."
}
},
"additionalProperties": false
}🟢get_usage(start_date, end_date)
Total your workspace's priced calls over a period, this calendar month by default: requests, units, compute time, cost, cached and prepaid calls, and the part of this month's cost still to be billed. Needs a Last Price credential.
Input Schema
{
"type": "object",
"properties": {
"start_date": {
"type": "string",
"format": "date-time",
"description": "Start of the period, ISO 8601. Defaults to the first of this month."
},
"end_date": {
"type": "string",
"format": "date-time",
"description": "End of the period, ISO 8601. Defaults to now."
}
},
"additionalProperties": false
}🟢list_usage_events(function_id, start_date, end_date, limit, offset)
List your workspace's priced calls, newest first: each one's id (what report_outcome takes to report it), function, cost, the price given and the inputs it was given for, and who sent it. Needs a Last Price credential.
Input Schema
{
"type": "object",
"properties": {
"function_id": {
"type": "string",
"format": "uuid",
"description": "Only calls priced by this function."
},
"start_date": {
"type": "string",
"format": "date-time",
"description": "Only calls from this time on, ISO 8601."
},
"end_date": {
"type": "string",
"format": "date-time",
"description": "Only calls up to this time, ISO 8601."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Page size. Defaults to 50."
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 1000000,
"description": "Calls to skip. Defaults to 0, at most 1000000."
}
},
"additionalProperties": false
}🟢get_receipt(usage_event_id)
Get the receipt for one of your workspace's priced calls, by its usage event id (the id list_usage_events returns and report_outcome takes): what was priced, by which function and agent, when, the amount, how it was paid, and the outcome if one was reported. Receipts are made only when you ask, never sent for every call. For CSV or a printable page, call GET /api/receipts/{id} with format=csv or format=html. Needs a Last Price credential with price compute or billing read scope.
Input Schema
{
"type": "object",
"properties": {
"usage_event_id": {
"type": "string",
"format": "uuid",
"description": "The priced call's usage event id, as list_usage_events returns it."
}
},
"required": [
"usage_event_id"
],
"additionalProperties": false
}🟡list_receipts(ids, start_date, end_date, function_id, agent_id, ...)
Get receipts for many of your workspace's priced calls at once, as one statement with totals: name up to 50 usage event ids, or a period (this calendar month by default, at most 366 days), optionally for one function or agent. A period statement also counts, for each agent, the value signals set up in Settings, Value receipts. Receipts are made only when you ask. For CSV or a printable page, call GET /api/receipts with format=csv or format=html. Needs a Last Price credential with price compute or billing read scope.
Input Schema
{
"type": "object",
"properties": {
"ids": {
"type": "string",
"maxLength": 1900,
"description": "Up to 50 usage event ids, comma separated. Send ids or a period, not both."
},
"start_date": {
"type": "string",
"format": "date-time",
"description": "Start of the period, ISO 8601. Defaults to the first of this month (UTC)."
},
"end_date": {
"type": "string",
"format": "date-time",
"description": "End of the period, ISO 8601. Defaults to now."
},
"function_id": {
"type": "string",
"format": "uuid",
"description": "Only calls priced by this function."
},
"agent_id": {
"type": "string",
"format": "uuid",
"description": "Only calls made by this agent. A key bound to an agent always gets only its own calls."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "Receipts per page for a period. Defaults to 100."
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 1000000,
"description": "Receipts to skip for a period. Defaults to 0, at most 1000000."
}
},
"additionalProperties": false
}🟢list_notifications(limit, cursor)
List your workspace's notifications, newest first, with the unread count: approval requests, disputes, price proposals, email to agent inboxes and, for the agent that owns the workspace, failed webhook deliveries. Pass the next cursor a page returns back as cursor for the next page. Unread is per reader: an agent has one read state for all its keys and tokens, a plain key has its own. Needs a Last Price credential with notifications read scope; the agent that owns the workspace needs none.
Input Schema
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Page size. Defaults to 50."
},
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 400,
"description": "The next cursor from the previous page, unchanged."
}
},
"additionalProperties": false
}🟡mark_notifications_read(read_through)
Mark your workspace's notifications read for this reader only (your agent, or your key), up to read_through (default now). Send the creation time of the newest item you handled so anything newer stays unread. Needs a Last Price credential with notifications write scope; the agent that owns the workspace needs none.
Input Schema
{
"type": "object",
"properties": {
"read_through": {
"type": "string",
"format": "date-time",
"description": "Mark everything created at or before this time read, ISO 8601. Defaults to now."
}
},
"additionalProperties": false
}🟢read_my_inbox(limit, cursor)
Read the newest messages in your own agent inbox: the inbox of the agent your key or token is bound to, and no other. Answers live from the mail provider when it is reachable, otherwise from the mail Last Price stored (source says which). Needs an agent key, or a token exchanged from one.
Input Schema
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Messages to return. Defaults to 25."
},
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "The cursor the previous page returned, for live mail only."
}
},
"additionalProperties": false
}Community
Evidence