Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
termYesSearch term to match against contact names

Implementation Reference

  • 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"],
      },
    },
  • 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);
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries burden. It declares read operation returning matching contacts, but lacks details like pagination, case sensitivity, or result limitations. Adequate for simple use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no superfluous information. Front-loaded with purpose, followed by clarifying detail. Highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple search with one parameter and no output schema, description is fairly complete. Missing details like case handling or results format, but overall adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds no additional meaning beyond the schema's parameter description for 'term', which already states matching contact names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'search' and resource 'contacts', with specific behavior 'name contains the search term'. Distinguishes from sibling tools like xero_contacts_get (by ID) and xero_contacts_list (list all).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear context for searching by name, but lacks explicit exclusions or alternatives. Given sibling tools, the purpose is well understood without additional guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wyre-technology/xero-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server