Skip to main content
Glama
CanalWestStudio

AddressPenny MCP Server

bulk_validate

Validate up to 100 postal addresses in a single request. Returns an array of validated addresses or errors.

Instructions

Validate up to 100 postal addresses in a single request. Consumes 1 credit per address. Returns an array where each entry is either a validated address or an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressesYesArray of address strings to validate (max 100).

Implementation Reference

  • src/index.ts:58-81 (registration)
    Tool 'bulk_validate' is registered via server.registerTool() with zod inputSchema (array of 1-100 strings) and handler.
    server.registerTool(
      "bulk_validate",
      {
        description:
          "Validate up to 100 postal addresses in a single request. Consumes 1 credit per address. Returns an array where each entry is either a validated address or an error.",
        inputSchema: {
          addresses: z
            .array(z.string().min(1))
            .min(1)
            .max(100)
            .describe("Array of address strings to validate (max 100)."),
        },
      },
      async ({ addresses }) => {
        try {
          const result = await client.bulkValidate(addresses);
          return {
            content: [{ type: "text", text: JSON.stringify(shapeMany(result), null, 2) }],
          };
        } catch (error) {
          return errorResult(error);
        }
      }
    );
  • Client method bulkValidate() that POSTs addresses to /accounts/{accountId}/addresses/batch.
    async bulkValidate(addresses: string[]) {
      return this.post(`/accounts/${this.accountId}/addresses/batch`, {
        addresses,
        sync: true,
      });
    }
  • shapeMany() helper transforms the bulk validate API response envelope into a ShapedAddress[] array.
    export function shapeMany(envelope: unknown): ShapedAddress[] {
      const entries = ((envelope as { addresses?: RawAddress[] })?.addresses ?? []) as RawAddress[];
      return entries.map(shape);
    }
Behavior4/5

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

No annotations are provided, so the description carries full responsibility. It discloses credit consumption (1 per address) and return format (array of validated address or error), which are key behavioral traits. It does not detail authorization needs or rate limits, but the provided information is adequate for safe invocation.

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?

The description is two sentences and conveys all essential information without extraneous text. It is front-loaded with the main action and then adds cost and return details, making it efficient and easy to parse.

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 tool with one parameter and no output schema, the description covers usage limits, cost, and return structure. However, it does not mention error handling behaviors (e.g., partial failures) or contrast with sibling tools, leaving some gaps for an agent to fully understand context.

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?

The input schema covers the single parameter 'addresses' with a description that already states 'max 100'. The tool description adds no additional meaning beyond what the schema provides (e.g., no format examples or expected address standards). With 100% schema coverage, baseline 3 is appropriate.

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 postal addresses in bulk, with a specific limit of 100 addresses. It also mentions credit consumption and return format, making the purpose unambiguous. The sibling tools 'parse_and_validate' and 'validate_address' suggest different scopes, but the description implicitly differentiates by focusing on batch processing.

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?

The description provides context (single request, up to 100 addresses) but does not explicitly state when to use this tool versus alternatives like 'validate_address' for single address validation. No exclusions or prerequisites are mentioned, leaving the agent to infer usage without clear 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/CanalWestStudio/addresspenny-mcp'

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