Skip to main content
Glama

Price a micro-task

price_task
Read-onlyIdempotent

Price one micro-task in USDC and return exact x402 payment instructions.

Free to call, no authentication, no side effects. The quote does not lock the price.

Payment (x402): request the task endpoint for HTTP 402 with the price and receiver 0x37239DF5f8ffE8541657624726e0ffc517B38C57; send the exact USDC on Base (maxFeePerGas=0); retry with header X-Payment: <tx_hash>.

Parameters: the name must match the one passed to execute_task; unknown names return an error and nothing is charged.

When to use: after list_tasks, before paying. Use execute_task to run it.

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": {
      "task": "<task>"
    },
    "name": "price_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYesName of the micro-task to price, e.g. 'summarize'. Must be a task NAME from the list_tasks tool - not a task ID, specification, or free text. TEXT: summarize, extract, sentiment, translate, rewrite. CODE: code_review, code_explain. DATA: json_query, csv_to_json. MEDIA: describe_image.

Output Schema

NameRequiredDescriptionDefault
taskNo
assetNo
errorNo
networkNo
receiverNo
availableNo
how_to_payNonumbered x402 payment steps
price_usdcNoexact USDC price
implementedNo
api_endpointNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / task / description
      Previous value: -"Name of the micro-task to price, e.g. 'summarize'. Must be a task NAME from the list_tasks tool - not a task ID, specification, or free text. TEXT: summarize, extract, keywords, sentiment, translate, rewrite, proofread. CODE: python_debug, code_lint, code_refactor, code_explain, code_review. DATA: json_minify, json_query, csv_to_json, hash, base64, convert. MEDIA: describe_image, probe_media."New value: +"Name of the micro-task to price, e.g. 'summarize'. Must be a task NAME from the list_tasks tool - not a task ID, specification, or free text. TEXT: summarize, extract, sentiment, translate, rewrite. CODE: code_review, code_explain. DATA: json_query, csv_to_json. MEDIA: describe_image."
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, but the description adds material context beyond them: free to call, no authentication, no side effects, and that the quote does not lock the price. It also documents error behavior ("unknown names return an error and nothing is charged") and the full 402 retry sequence.

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?

Front-loaded with purpose, then safety profile, then payment mechanics, then parameters, then when-to-use. Every line carries actionable information with no restatement of the title or schema.

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?

An output schema exists so return values need no explanation, and the description still covers the payment handshake, the no-charge-on-error guarantee, and the naming constraint. For a single-parameter read-only pricing tool this leaves no meaningful gap.

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 100% and the schema already enumerates the valid task names, so the baseline is 3. The description adds a genuinely new constraint not in the schema: the name must match the one later passed to `execute_task`, which prevents a class of downstream failures.

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?

States a specific verb and resource ("Price one micro-task in USDC") plus the output ("exact x402 payment instructions"), which immediately separates it from execute_task, list_tasks, and verify_payment. An agent can place this tool in the workflow without opening the schema.

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

Usage Guidelines5/5

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

Gives an explicit ordering rule ("after `list_tasks`, before paying") and names the follow-on tool ("Use `execute_task` to run it"). It also implicitly excludes misuse by noting the tool only quotes and does not lock the price.

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