xero_contacts_search
Search contacts by name to find matching records. Returns contacts whose names contain the search term.
Instructions
Search contacts by name. Returns contacts whose name contains the search term.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | Search term to match against contact names |
Implementation Reference
- src/domains/contacts.ts:95-108 (registration)Tool definition (schema) for xero_contacts_search in the contactTools array. Declares 'term' as a required string input.
name: "xero_contacts_search", description: "Search contacts by name. Returns contacts whose name contains the search term.", inputSchema: { type: "object", properties: { term: { type: "string", description: "Search term to match against contact names", }, }, required: ["term"], }, }, - src/domains/contacts.ts:198-207 (handler)Handler for xero_contacts_search - takes a 'term', constructs a Xero 'where' clause with Name.Contains, and calls GET /Contacts with that filter.
case "xero_contacts_search": { const { term } = args as { term: string }; const params: Record<string, string> = { where: `Name.Contains("${term}")`, }; const response = await client.get("Contacts", params); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } - src/index.ts:255-256 (registration)Routing in the CallToolRequestSchema handler: dispatches xero_contacts_* tools to handleContactTool.
if (name.startsWith("xero_contacts_")) { return await handleContactTool(name, toolArgs);