Conformance check between an A2A AgentCard and an MCP server's tools/list. Answers: does the agent's declared tool surface match what the server actually exposes?
Status: v0.1.0 — Node 20/22 supported, library + CLI.
The AgentCard capabilities.tools[] declares what tools the agent says it uses. The MCP server's tools/list declares what's actually available. These two surfaces tend to drift: a tool gets added on the server before the card is updated, or a tool is removed from the server but still listed in the card. Either drift breaks the trust contract.
This library catches that drift deterministically.
| Bucket | Meaning | Default conformance impact |
|---|---|---|
| Matched | Declared in card AND exposed by server | ok |
| Missing | Declared in card, NOT exposed by server | fails |
| Undeclared | Exposed by server, NOT declared in card | informational (fails under --strict) |
npx agent-card-tool-coverage --card <card.json> --tools <tools-list.json>
[--format json|markdown|summary]
[--strict] [--case-insensitive]
[--out FILE]
Exit code:
0— conformant1— non-conformant2— usage / I/O error
Drop it into a GitHub Action to gate AgentCard PRs against your current MCP server tools/list snapshot (you can capture one with mcp-tools-snapshot).
import { coverage, toMarkdown, toSummary } from "agent-card-tool-coverage";
const report = coverage(card, toolsList, { strict: false });
// { declared, available, missing, undeclared, matched, conformant, declaredBySideEffect }
if (!report.conformant) {
console.error(toSummary(report)); // "fail — 2/4 matched, 2 missing, 1 undeclared"
}
console.log(toMarkdown(report)); // GitHub-flavored summaryagent-cards-spec— the AgentCard schema this consumes.mcp-tools-snapshot— captures thetools/listJSON you feed in via--tools.a2a-mcp-bridge— generates AgentCards from MCP descriptors; pair this check to confirm the generated card is still in sync with the live server.agent-card-diff— sibling tool for diffing two AgentCards.
npm install
npm run lint && npm run typecheck && npm run coverage && npm run build
npm run demo