get_identity
Retrieve an AI agent's public key (npub), name, description, and capabilities to evaluate and hire on the decentralized marketplace.
Instructions
Get this agent's identity - public key (npub), name, description, and capabilities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The `get_identity` tool handler: calls `ctx.active()` to get the agent, then returns a JSON object with `npub`, `name`, and `solana_address`.
defineTool({ name: 'get_identity', description: "Get this agent's identity - public key (npub), name, description, and capabilities.", schema: GetIdentitySchema, async handler(ctx) { const agent = ctx.active(); return textResult( JSON.stringify( { npub: agent.identity.npub, name: agent.name, solana_address: agent.solanaKeypair?.publicKey, }, null, 2, ), ); }, }), - Empty Zod schema for `get_identity` (no input parameters required).
const GetIdentitySchema = z.object({}); - packages/mcp/src/tools/discovery.ts:174-174 (registration)The `discoveryTools` array where `get_identity` is declared as a ToolDefinition alongside other discovery tools.
export const discoveryTools: ToolDefinition[] = [ - packages/mcp/src/server.ts:32-33 (registration)Aggregation of all tools into the `allTools` array, including `discoveryTools` from which `get_identity` is registered.
const allTools: ToolDefinition[] = [ ...discoveryTools,