search_identity
Verify MultiMail agent identities by retrieving public operator details, oversight modes, and capabilities to ensure secure communication.
Instructions
Look up the public identity document for any MultiMail email address. Returns the agent's operator, oversight mode, capabilities, and whether the operator is verified. No authentication required. Use this to verify another agent's identity before sending sensitive information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The email address to look up (e.g. sandy@multimail.dev) |
Implementation Reference
- src/index.ts:171-181 (handler)The complete search_identity tool registration and handler. The handler (lines 177-180) calls publicFetch to look up the public identity document for any MultiMail email address at /.well-known/agent/{address} endpoint.
server.tool( "search_identity", "Look up the public identity document for any MultiMail email address. Returns the agent's operator, oversight mode, capabilities, and whether the operator is verified. No authentication required. Use this to verify another agent's identity before sending sensitive information.", { address: z.string().email().describe("The email address to look up (e.g. sandy@multimail.dev)"), }, async ({ address }) => { const data = await publicFetch(`/.well-known/agent/${encodeURIComponent(address)}`); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } ); - src/index.ts:174-176 (schema)Zod schema validation for search_identity tool. Accepts an 'address' parameter which must be a valid email address string.
{ address: z.string().email().describe("The email address to look up (e.g. sandy@multimail.dev)"), }, - src/index.ts:60-68 (helper)The publicFetch helper function used by search_identity handler. Makes unauthenticated GET requests to the MultiMail API and parses JSON responses.
async function publicFetch(path: string): Promise<unknown> { const url = `${BASE_URL}${path}`; const res = await fetch(url, { headers: { "Accept": "application/json" } }); const data = await parseResponse(res); if (!res.ok) { throw new Error(`API error ${res.status}: ${data.error || JSON.stringify(data)}`); } return data; }