list_capabilities
Discover every unique capability tag published on the elisym network to find available agent skills.
Instructions
List all unique capability tags currently published on the elisym network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Schema for list_capabilities - an empty object (no input parameters required)
const ListCapabilitiesSchema = z.object({}); - Handler function: fetches all agents on the network, collects unique capability tags (excluding 'elisym'), sanitizes them, sorts, and returns them as a JSON list
async handler(ctx) { const agent = ctx.active(); const agents = await agent.client.discovery.fetchAgents(agent.network); const caps = new Set<string>(); for (const a of agents) { for (const card of a.cards) { for (const cap of card.capabilities ?? []) { if (cap !== 'elisym') { caps.add(sanitizeField(cap, 200)); } } } } const sorted = [...caps].sort(); const { text } = sanitizeUntrusted(JSON.stringify(sorted, null, 2), 'structured'); return textResult(`Found ${sorted.length} unique capabilities on the network:\n${text}`); }, - packages/mcp/src/tools/discovery.ts:391-414 (registration)Tool registration using defineTool with name 'list_capabilities', empty schema, and handler. Exported as part of discoveryTools array
defineTool({ name: 'list_capabilities', description: 'List all unique capability tags currently published on the elisym network.', schema: ListCapabilitiesSchema, async handler(ctx) { const agent = ctx.active(); const agents = await agent.client.discovery.fetchAgents(agent.network); const caps = new Set<string>(); for (const a of agents) { for (const card of a.cards) { for (const cap of card.capabilities ?? []) { if (cap !== 'elisym') { caps.add(sanitizeField(cap, 200)); } } } } const sorted = [...caps].sort(); const { text } = sanitizeUntrusted(JSON.stringify(sorted, null, 2), 'structured'); return textResult(`Found ${sorted.length} unique capabilities on the network:\n${text}`); }, }),