Skip to main content
Glama

Verify an international address

lob_intl_verifications_create
Read-onlyIdempotent

Verify a non-US address to check deliverability and get standardized address components for the destination country.

Instructions

Verify a single non-US address. Returns deliverability status and standardized components for the destination country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
primary_lineYesPrimary street address line.
secondary_lineNo
cityNo
stateNoState, province, or region.
postal_codeNo
countryYesTwo-letter ISO country code.
addressNoFull single-line address (alternative to fields above).
recipientNo
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_intl_verifications_create — makes a POST request to Lob's /intl_verifications endpoint with the validated arguments merged with extra params.
    handler: async (args) => {
      const { extra, ...rest } = args;
      return lob.request({
        method: "POST",
        path: "/intl_verifications",
        body: withExtra(rest, extra),
      });
    },
  • Input schema for lob_intl_verifications_create — spreads intlAddressInputSchema (primary_line, secondary_line, city, state, postal_code, country) plus optional address, recipient, and extra params.
    inputSchema: {
      ...intlAddressInputSchema,
      address: z.string().optional().describe("Full single-line address (alternative to fields above)."),
      recipient: z.string().optional(),
      extra: extraParamsSchema,
    },
  • Registration of lob_intl_verifications_create tool via registerTool() helper, within the registerVerificationTools() function called from register.ts
    registerTool(server, {
      name: "lob_intl_verifications_create",
      annotations: { title: "Verify an international address", ...ToolAnnotationPresets.read },
      description:
        "Verify a single non-US address. Returns deliverability status and standardized components for " +
        "the destination country.",
      inputSchema: {
        ...intlAddressInputSchema,
        address: z.string().optional().describe("Full single-line address (alternative to fields above)."),
        recipient: z.string().optional(),
        extra: extraParamsSchema,
      },
      handler: async (args) => {
        const { extra, ...rest } = args;
        return lob.request({
          method: "POST",
          path: "/intl_verifications",
          body: withExtra(rest, extra),
        });
      },
    });
  • withExtra helper — merges extra params with the typed payload, with explicit fields taking precedence over extra.
    export function withExtra(
      payload: object,
      extra: Record<string, unknown> | undefined,
    ): Record<string, unknown> {
      return { ...(extra ?? {}), ...compact(payload) };
    }
  • registerTool helper — wraps the tool definition with error handling and registers it with 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,
      );
    }
  • The intlAddressInputSchema used as the base for the input schema of lob_intl_verifications_create.
    const intlAddressInputSchema = {
      primary_line: z.string().describe("Primary street address line."),
      secondary_line: z.string().optional(),
      city: z.string().optional(),
      state: z.string().optional().describe("State, province, or region."),
      postal_code: z.string().optional(),
      country: z.string().length(2).describe("Two-letter ISO country code."),
    };
Behavior4/5

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

Annotations already indicate read-only and idempotent behavior; description adds that it returns deliverability status and standardized components, providing value beyond annotations.

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, front-loaded with purpose, no unnecessary words.

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 the complexity (9 parameters, no output schema), the description provides a basic overview but lacks details on input alternatives, error handling, and return format assumptions.

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

Parameters2/5

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

With 56% schema description coverage, several parameters lack descriptions in both schema and tool description. The description does not explain parameter-specific details beyond the general purpose.

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 verb 'Verify' and the resource 'a single non-US address', distinguishing it from siblings like lob_us_verifications_create and lob_bulk_intl_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 Guidelines4/5

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

The description implies usage for single international address verification but lacks explicit when-not or alternative tool recommendations.

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