identify_application
Identify Voi blockchain applications by ID to retrieve protocol details, role, type, and description information for ecosystem analysis.
Instructions
Identify a Voi application by ID — returns protocol, role, type, and description if known
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | Yes | Application ID on Voi |
Implementation Reference
- tools/identify.js:15-36 (handler)The async handler function that executes the identify_application tool logic. It takes an appId parameter, looks up the application in the registry using findApplication(), retrieves protocol information if available, and returns structured results with application details or a 'not found' message.
async ({ appId }) => { const app = findApplication(appId); if (!app) { return toolResult({ appId, known: false, message: `Application ${appId} is not in the Voi ecosystem registry`, }); } const protocol = app.protocol ? findProtocol(app.protocol) : null; return toolResult({ appId, known: true, name: app.name, protocol: app.protocol, protocolName: protocol?.name || null, type: app.type, role: app.role, description: app.description, tokens: app.tokens || null, }); }, - tools/identify.js:10-14 (schema)Zod schema definition for the identify_application tool input. Validates that appId is an integer number and provides a description for the parameter.
appId: z .number() .int() .describe("Application ID on Voi"), }, - tools/identify.js:6-37 (registration)Complete tool registration using server.tool() method. Registers the 'identify_application' tool with its description, input schema, and handler function.
server.tool( "identify_application", "Identify a Voi application by ID — returns protocol, role, type, and description if known", { appId: z .number() .int() .describe("Application ID on Voi"), }, async ({ appId }) => { const app = findApplication(appId); if (!app) { return toolResult({ appId, known: false, message: `Application ${appId} is not in the Voi ecosystem registry`, }); } const protocol = app.protocol ? findProtocol(app.protocol) : null; return toolResult({ appId, known: true, name: app.name, protocol: app.protocol, protocolName: protocol?.name || null, type: app.type, role: app.role, description: app.description, tokens: app.tokens || null, }); }, ); - index.js:13-13 (registration)Invokes registerIdentifyTools(server) to register all identify tools including identify_application with the MCP server instance.
registerIdentifyTools(server); - lib/registry.js:42-45 (helper)Helper function findApplication() used by the handler to look up application data by ID from the loaded applications registry JSON.
export function findApplication(appId) { const apps = getApplications(); return apps[String(appId)] || null; }