submit
Submit your service URL for free indexing in the x402 Discovery Hub, a search engine for the agent economy.
Instructions
Submit your x402/MPP/Lightning service for free indexing
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Your service URL | |
| name | No | Service name | |
| description | No | What your service does |
Implementation Reference
- server.js:29-29 (registration)Registration of the 'submit' tool with its name, description, and input schema (url required, name and description optional) in the ListToolsRequestSchema handler.
{ name: 'submit', description: 'Submit your x402/MPP/Lightning service for free indexing', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Your service URL' }, name: { type: 'string', description: 'Service name' }, description: { type: 'string', description: 'What your service does' } }, required: ['url'] } }, - server.js:51-55 (handler)Handler for the 'submit' tool: sends a POST request to BASE_URL/submit with the arguments as JSON body, returns the response as text.
if (name === 'submit') { const resp = await fetch(`${BASE_URL}/submit`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(args) }); const data = await resp.json(); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; } - server.js:29-29 (schema)Input schema for the 'submit' tool: expects a 'url' string (required), plus optional 'name' and 'description' strings.
{ name: 'submit', description: 'Submit your x402/MPP/Lightning service for free indexing', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Your service URL' }, name: { type: 'string', description: 'Service name' }, description: { type: 'string', description: 'What your service does' } }, required: ['url'] } },