Skip to main content
Glama

get_entity_export

Export the canonical golden record for a specific AnchorID to retrieve merged identity data from all linked source records as a unified JSON object.

Instructions

Export the golden record for an AnchorID. Returns the merged/canonical view of all linked source records as a single JSON object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesUUID of the AnchorID to export

Implementation Reference

  • src/tools.ts:380-396 (registration)
    Registration of the 'get_entity_export' tool using server.tool() with name, description, Zod schema, and inline handler function
    // ─── 11. get_entity_export ──────────────────────────────────────
    server.tool(
      "get_entity_export",
      "Export the golden record for an AnchorID. Returns the merged/canonical " +
        "view of all linked source records as a single JSON object.",
      {
        entity_id: z.string().describe("UUID of the AnchorID to export"),
      },
      async ({ entity_id }) => {
        try {
          const data = await api.get(`/entities/${entity_id}/export`);
          return jsonContent(data);
        } catch (e) {
          return errorContent(e);
        }
      },
    );
  • Inline handler function for 'get_entity_export' that calls the API endpoint /entities/{entity_id}/export and returns formatted JSON content
    async ({ entity_id }) => {
      try {
        const data = await api.get(`/entities/${entity_id}/export`);
        return jsonContent(data);
      } catch (e) {
        return errorContent(e);
      }
    },
  • Zod schema definition for the 'get_entity_export' tool input parameter - entity_id as a UUID string
    {
      entity_id: z.string().describe("UUID of the AnchorID to export"),
    },
  • Helper functions jsonContent and errorContent used by the tool handler to format API responses and errors as MCP tool content
    /** Format the API response as MCP tool content. */
    function jsonContent(data: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
      };
    }
    
    /** Format an error as MCP tool content (isError flag). */
    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 the full burden. It discloses the return format ('single JSON object') and data characteristics ('merged/canonical view'), but omits operational traits like read-only safety, rate limits, or potential size constraints of the export.

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 with zero waste: first states the operation, second describes the return value. Information is front-loaded and appropriately sized for a single-parameter tool.

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 simple schema (1 parameter, 100% coverage) and lack of output schema, the description adequately explains what the tool returns. It could be improved by noting the read-only nature (given no annotations), but otherwise covers the essential behavioral contract.

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?

With 100% schema coverage, the baseline is 3. The description uses the term 'AnchorID' which aligns with the entity_id parameter's schema description ('UUID of the AnchorID'), reinforcing the domain mapping, but does not add syntax details or examples beyond what the schema provides.

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

Purpose4/5

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

The description clearly identifies the action ('Export') and resource ('golden record'/'AnchorID'), and distinguishes this from get_entity by specifying it returns the 'merged/canonical view'. However, it does not explicitly contrast with the sibling get_entity tool to clarify when to choose one over the other.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives like get_entity, or prerequisites for invocation. While the term 'export' implies a retrieval of the full merged record, the description lacks explicit when/when-not directives.

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