describeTool from @rail402.dev/sdk (also exported from @rail402.dev/seller-helpers).
MCP tools are first-class resources
An MCP tool is a resource type in its own right, keyed on the pair ofresource.url and toolName, because one MCP endpoint serves many tools. That key is what lets an agent find one specific tool, and what lets you list several tools from the same endpoint without collision.
You declare a tool the same way you describe an HTTP endpoint, with a toolName, a description for the tool, and a description for every parameter.
description and every parameter description are what search ranks and what an agent reads to build a valid call, exactly as for an HTTP endpoint. Write them for a reader who has never seen your tool.
The resource URL must be addressable
The declaration must also carrytoolName. Without it there is no key to distinguish this tool from the others on the same endpoint, and the facilitator rejects the entry with a coded, non-null reason. See Errors.
Cataloging works the same way
An MCP tool is cataloged on the same settlement-gated, hybrid path as any other resource: a provisional listing at verify, a confirmed and owned listing at settlement. Nothing about MCP changes when a listing appears or who owns it. See Get discovered for the full flow.Try it end to end
Theexamples/mcp-tool-seller example in the Rail402 repository runs a paid MCP tool that catalogs itself, gets found by natural-language search, and gets called and paid, end to end on testnet.
Next steps
Get discovered
Write parameter descriptions an agent can act on, and see what the facilitator catalogs and when.
Meter usage with upto
Bill a tool for actual usage against a buyer-authorized ceiling.
Buyer quickstart
See the other side: an agent discovers your tool and pays to call it.
Bazaar trust model
How MCP tools are keyed, owned, and protected from squatting.
When it fails
Anmcp:// resource URL is rejected with bazaar_mcp_resource_url_not_addressable, and a listing without a toolName is rejected with a coded reason. Every code and its reason is in Errors.