citation_audit
Check NAP consistency across 20 major directories like Yelp, BBB, Facebook. Get a consistency score and per-directory details to identify listing issues.
Instructions
Check NAP (Name, Address, Phone) consistency across 20 major directories like Yelp, BBB, Facebook, and YellowPages. Returns consistency score and per-directory details. Costs 50 credits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| business_name | Yes | Business name | |
| address | Yes | Full business address | |
| phone | Yes | Business phone number |
Implementation Reference
- src/tools/audit.ts:88-106 (handler)The citation_audit tool handler definition. Calls /v1/audit/citation API with business_name, address, and phone. Wrapped with error handling. Returns formatted results using formatResult.
server.tool( "citation_audit", "Check NAP (Name, Address, Phone) consistency across 20 major directories like Yelp, BBB, Facebook, and YellowPages. Returns consistency score and per-directory details. Costs 50 credits.", { business_name: z.string().describe("Business name"), address: z.string().describe("Full business address"), phone: z.string().describe("Business phone number"), }, READ_ONLY, withErrorHandling(async ({ business_name, address, phone }) => { const result = await callApi( "/v1/audit/citation", { business_name, address, phone }, getAuth(), 120_000 ); return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] }; }) ); - src/tools/audit.ts:91-95 (schema)Input schema for citation_audit tool: business_name (string), address (string), phone (string) — all using Zod validation with descriptions.
{ business_name: z.string().describe("Business name"), address: z.string().describe("Full business address"), phone: z.string().describe("Business phone number"), }, - src/tools/audit.ts:88-107 (registration)Tool registered via server.tool() with the name 'citation_audit' inside registerAuditTools function.
server.tool( "citation_audit", "Check NAP (Name, Address, Phone) consistency across 20 major directories like Yelp, BBB, Facebook, and YellowPages. Returns consistency score and per-directory details. Costs 50 credits.", { business_name: z.string().describe("Business name"), address: z.string().describe("Full business address"), phone: z.string().describe("Business phone number"), }, READ_ONLY, withErrorHandling(async ({ business_name, address, phone }) => { const result = await callApi( "/v1/audit/citation", { business_name, address, phone }, getAuth(), 120_000 ); return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] }; }) ); } - src/server.ts:38-38 (registration)Registration call in server.ts: registerAuditTools(server, getAuth) wires the audit tools (including citation_audit) into the MCP server.
registerAuditTools(server, getAuth); - src/api-client.ts:132-138 (helper)The formatResult helper used to format the response. Appends credit usage metadata to the JSON output.
export function formatResult( data: unknown, meta: { credits_used: number; credits_remaining: number; cached: boolean } ): string { const metaLine = `[${meta.credits_used} credit${meta.credits_used !== 1 ? "s" : ""} used | ${meta.credits_remaining} remaining${meta.cached ? " | cached" : ""}]`; return `${metaLine}\n\n${JSON.stringify(data, null, 2)}`; }