Skip to main content
Glama

resolve_company

Resolve a company to a unique AnchorID by providing domain, name, location, or external identifiers for accurate identity matching and disambiguation.

Instructions

Resolve a company to an AnchorID using domain, name, city/state, or external identifiers. Returns status (resolved | needs_review | not_found), confidence score, the canonical AnchorID, match reasons, and any ambiguous candidates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoCompany domain (e.g. acme.com)
nameNoCompany name
cityNoCity for geo-matching
stateNoState for geo-matching
identifiersNoExternal system identifiers
min_confidenceNoMinimum confidence threshold (0-1)

Implementation Reference

  • src/tools.ts:47-82 (registration)
    Registration of the 'resolve_company' tool on the MCP server via server.tool(). This is where the tool name, description, input schema, and handler are all registered together.
    // ─── 1. resolve_company ──────────────────────────────────────────
    server.tool(
      "resolve_company",
      "Resolve a company to an AnchorID using domain, name, city/state, " +
        "or external identifiers. Returns status (resolved | needs_review | not_found), " +
        "confidence score, the canonical AnchorID, match reasons, and any ambiguous candidates.",
      {
        domain: z.string().optional().describe("Company domain (e.g. acme.com)"),
        name: z.string().optional().describe("Company name"),
        city: z.string().optional().describe("City for geo-matching"),
        state: z.string().optional().describe("State for geo-matching"),
        identifiers: z
          .object({
            stripe_customer_id: z.string().optional(),
            salesforce_account_id: z.string().optional(),
            hubspot_company_id: z.string().optional(),
            phone: z.string().optional(),
          })
          .optional()
          .describe("External system identifiers"),
        min_confidence: z
          .number()
          .min(0)
          .max(1)
          .optional()
          .describe("Minimum confidence threshold (0-1)"),
      },
      async (input) => {
        try {
          const data = await api.post("/resolve/company", input as Record<string, unknown>);
          return jsonContent(data);
        } catch (e) {
          return errorContent(e);
        }
      },
    );
  • Input schema for 'resolve_company' using Zod validation. Defines optional fields: domain, name, city, state, identifiers (stripe_customer_id, salesforce_account_id, hubspot_company_id, phone), and min_confidence (0-1).
    {
      domain: z.string().optional().describe("Company domain (e.g. acme.com)"),
      name: z.string().optional().describe("Company name"),
      city: z.string().optional().describe("City for geo-matching"),
      state: z.string().optional().describe("State for geo-matching"),
      identifiers: z
        .object({
          stripe_customer_id: z.string().optional(),
          salesforce_account_id: z.string().optional(),
          hubspot_company_id: z.string().optional(),
          phone: z.string().optional(),
        })
        .optional()
        .describe("External system identifiers"),
      min_confidence: z
        .number()
        .min(0)
        .max(1)
        .optional()
        .describe("Minimum confidence threshold (0-1)"),
    },
  • Handler function for 'resolve_company'. Calls the API client's post method to /resolve/company with the input, and returns JSON content or error content.
      async (input) => {
        try {
          const data = await api.post("/resolve/company", input as Record<string, unknown>);
          return jsonContent(data);
        } catch (e) {
          return errorContent(e);
        }
      },
    );
  • Helper function jsonContent() used by the handler to format successful API responses as MCP text content.
    function jsonContent(data: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
      };
    }
  • Helper function errorContent() used by the handler to format errors as MCP error content with structured metadata.
    function errorContent(err: unknown) {
      if (err instanceof ApiError) {
        const payload = {
          error: err.message,
          status_code: err.status_code,
          request_id: err.request_id,
          details: err.details,
        };
        return {
          content: [{ type: "text" as const, text: JSON.stringify(payload, null, 2) }],
          isError: true,
        };
      }
      return {
        content: [{ type: "text" as const, text: (err as Error).message ?? String(err) }],
        isError: true,
      };
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden for behavioral cues. It discloses that the tool returns status, confidence, and potential ambiguous candidates, but omits whether the operation is read-only, requires authentication, or has side effects. The behavioral disclosure is adequate but not comprehensive.

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

Conciseness4/5

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

The description is a single sentence that efficiently conveys purpose and outputs, though the list of output fields makes it slightly dense. It is front-loaded with the core action, but could benefit from structured formatting for readability.

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?

Given the absence of an output schema, the description compensates by listing return values (status, confidence, AnchorID, etc.). It covers the key aspects of input and output, though it does not address error handling or edge cases. The nested identifiers object is documented in the schema, so the description is sufficiently complete.

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 each parameter is already documented in the schema. The description groups input types (domain, name, city/state, identifiers) but does not add meaningful details beyond what the schema provides. It offers a high-level summary but no additional syntax or format guidance.

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?

The description uses a specific verb ('Resolve') and resource ('company to AnchorID'), clearly listing input types and outputs. It distinguishes itself from sibling tools like resolve_company_batch and resolve_person by focusing on single company resolution with multiple input options.

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

Usage Guidelines3/5

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

The description explains what inputs are accepted and what outputs are produced, but does not explicitly state when to use this tool versus its batch counterpart or other resolution tools. No exclusions or alternatives are mentioned, leaving the agent to infer usage context.

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/nolenation04/anchord-mcp'

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