Skip to main content
Glama

Validate identity for an address

lob_identity_validation
Read-onlyIdempotent

Confirm whether a person or business name is associated with a US address. Returns validation result.

Instructions

Validate a person/business name against a US address. Returns whether the recipient is associated with the address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientYesName to validate.
primary_lineYes
secondary_lineNo
cityNo
stateNo
zip_codeNo
extraNoAdditional Lob API parameters not enumerated above. Merged into the request body verbatim. See https://docs.lob.com for the full parameter list per resource.

Implementation Reference

  • Handler function for lob_identity_validation — sends a POST request to Lob's /identity_validation endpoint with the validated args plus optional extra params merged in.
    handler: async (args) => {
      const { extra, ...rest } = args;
      return lob.request({
        method: "POST",
        path: "/identity_validation",
        body: withExtra(rest, extra),
      });
    },
  • Input schema for lob_identity_validation — accepts recipient (required), primary_line (required), optional secondary_line/city/state/zip_code, and an extra escape hatch.
    inputSchema: {
      recipient: z.string().describe("Name to validate."),
      primary_line: z.string(),
      secondary_line: z.string().optional(),
      city: z.string().optional(),
      state: z.string().optional(),
      zip_code: z.string().optional(),
      extra: extraParamsSchema,
    },
  • Registration of the lob_identity_validation tool via registerTool() inside registerVerificationTools(), which is called from registerAllTools() in src/tools/register.ts.
    registerTool(server, {
      name: "lob_identity_validation",
      annotations: { title: "Validate identity for an address", ...ToolAnnotationPresets.read },
      description:
        "Validate a person/business name against a US address. Returns whether the recipient is " +
        "associated with the address.",
      inputSchema: {
        recipient: z.string().describe("Name to validate."),
        primary_line: z.string(),
        secondary_line: z.string().optional(),
        city: z.string().optional(),
        state: z.string().optional(),
        zip_code: z.string().optional(),
        extra: extraParamsSchema,
      },
      handler: async (args) => {
        const { extra, ...rest } = args;
        return lob.request({
          method: "POST",
          path: "/identity_validation",
          body: withExtra(rest, extra),
        });
      },
    });
  • The registerTool helper function that wraps each tool definition (including lob_identity_validation) with error handling and registers it on the MCP server.
    export function registerTool<TShape extends ZodRawShape>(
      server: McpServer,
      def: ToolDefinition<TShape>,
    ): void {
      const a = def.annotations ?? {};
      server.registerTool(
        def.name,
        {
          title: a.title ?? def.name,
          description: def.description,
          inputSchema: def.inputSchema,
          annotations: {
            ...a,
            // Lob is always external; default the hint accordingly.
            openWorldHint: a.openWorldHint ?? true,
          },
        },
        // The SDK's ToolCallback type is parameterised over the exact ZodRawShape and
        // resists the generic erasure here. The runtime contract (validated args in,
        // CallToolResult out) is correct, so we bridge the type boundary with `as never`.
        (async (args: unknown, serverCtx: unknown): Promise<CallToolResult> => {
          try {
            const result = await def.handler(args as never, serverCtx);
            return { content: [{ type: "text", text: stringifyResult(result) }] };
          } catch (err) {
            return {
              isError: true,
              content: [{ type: "text", text: formatErrorForTool(err) }],
            };
          }
        }) as never,
      );
    }
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the description's addition of 'returns whether recipient is associated' adds specific behavioral context. However, it lacks details on error handling, response structure, or rate limits beyond what annotations imply.

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 efficient sentences, front-loaded with the core purpose, no redundant or filler content.

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

Completeness3/5

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

Given no output schema and 7 parameters, the description is minimal. It explains the core action but omits parameter constraints (e.g., zip_code format), output details (e.g., boolean or match level), and edge cases. Adequate but not thorough.

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 only 29%, so the description must compensate. It identifies recipient as the name and primary_line as the address, but does not explain secondary_line, city, state, or zip_code beyond being part of the address. The 'extra' parameter is mentioned in schema but not described.

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 clearly states the tool validates a person/business name against a US address and returns association, which precisely defines its function and distinguishes it from address verification siblings like lob_us_verifications_create.

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 implies usage for US-based identity verification but does not explicitly contrast with sibling tools like lob_intl_verifications_create or explain when to choose this over address-only verifications. No when-not or alternative guidance is provided.

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/optimize-overseas/lob-mcp'

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