resolve_lookup
Resolve an organization slug to get its MCP/REST endpoints and trust level. Provide slug and country to retrieve endpoint URLs, trust score (0-100), trust level, and last heartbeat timestamp. Required before using other tools.
Instructions
Resolve an organization slug to its MCP/REST endpoints and trust level — the DNS of professional services. Use this when you know the org_slug and need its API endpoint before calling any other tool. Do NOT use for searching by vertical or location (use resolve.search or registry.search instead). Returns: endpoint URLs, trust score (0-100), trust level, and last heartbeat timestamp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org_slug | Yes | Slug de la organización (ej: clinica-dental-sur) | |
| country | No | País ISO 3166-1 alpha-2 (ej: cl, mx, ar). Default: cl | cl |
Implementation Reference
- The 'resolve.lookup' tool handler. It accepts an org_slug and optional country, and makes a GET request to /api/servicialo/resolve/{country}/{org_slug} via the public adapter.
export const resolveTools = { 'resolve.lookup': { description: 'Resolve an organization slug to its MCP/REST endpoints and trust level — the DNS of professional services. ' + 'Use this when you know the org_slug and need its API endpoint before calling any other tool. ' + 'Do NOT use for searching by vertical or location (use resolve.search or registry.search instead). ' + 'Returns: endpoint URLs, trust score (0-100), trust level, and last heartbeat timestamp.', schema: z.object({ org_slug: z.string().describe('Slug de la organización (ej: clinica-dental-sur)'), country: z.string().default('cl').describe('País ISO 3166-1 alpha-2 (ej: cl, mx, ar). Default: cl'), }), handler: async (client: ServicialoAdapter, args: { org_slug: string; country?: string }) => { const country = args.country ?? 'cl'; return client.pub.get(`/api/servicialo/resolve/${country}/${args.org_slug}`); }, }, - Zod schema for resolve.lookup: requires org_slug (string), optional country (default 'cl').
schema: z.object({ org_slug: z.string().describe('Slug de la organización (ej: clinica-dental-sur)'), country: z.string().default('cl').describe('País ISO 3166-1 alpha-2 (ej: cl, mx, ar). Default: cl'), }), - packages/mcp-server/src/index.ts:23-23 (registration)Import of resolveTools from './tools/public/resolve.js'.
import { resolveTools } from './tools/public/resolve.js'; - packages/mcp-server/src/index.ts:45-52 (registration)Spreading resolveTools into the publicTools record, making it available for registration.
const publicTools: Record<string, ToolDef> = { ...registryTools as unknown as Record<string, ToolDef>, ...publicAvailabilityTools as unknown as Record<string, ToolDef>, ...publicServicesTools as unknown as Record<string, ToolDef>, ...resolveTools as unknown as Record<string, ToolDef>, ...a2aTools as unknown as Record<string, ToolDef>, ...docsQuickstartTools as unknown as Record<string, ToolDef>, }; - packages/mcp-server/src/index.ts:128-162 (registration)The registerTools function that registers all tools (including resolve_lookup, after dot-to-underscore name conversion) with the MCP server.
function registerTools(tools: Record<string, ToolDef>) { for (const [name, tool] of Object.entries(tools)) { // MCP spec requires tool names to match [a-zA-Z0-9_-]{1,64} const safeName = name.replace(/\./g, '_'); server.tool( safeName, tool.description, tool.schema.shape, async (args) => { try { const result = await tool.handler(adapter, args as Record<string, unknown>); return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [ { type: 'text' as const, text: `Error: ${message}`, }, ], isError: true, }; } }, ); } }