Skip to content

feat(agents): conformance scenarios for agent discovery (agents-wg#22) - #556

Draft
panyam wants to merge 3 commits into
modelcontextprotocol:mainfrom
panyam:feat/agents-conformance-suite
Draft

panyam wants to merge 3 commits into
modelcontextprotocol:mainfrom
panyam:feat/agents-conformance-suite

Conversation

@panyam

@panyam panyam commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Draft until after the Agents WG vote on 2026-10-16. Per AGENTS.md this starts with an issue, which we'll open once the vote settles whether and how the proposal goes forward. This draft is here so that discussion has a diff to point at.

What changes

Adds a requirement-traceability yaml for the agent discovery extension, agents-wg#22, and two server scenarios that grade an implementation against it, plus 40 negative controls.

Scenario What it grades Checks
sep-9998-agents-discovery the io.modelcontextprotocol/agents capability; agents/list shape, cards and pagination; the flat agents/get result and modelRoutingHint; every returned tool matching its tools/list entry; agent_not_found and invalid_agent_definition; a hidden agent indistinguishable from an unknown one 27
sep-9998-agents-list-changed notifications/agents/list_changed over subscriptions/listen with agentsListChanged, and its acknowledgement 4

The yaml declares 49 rows quoting the proposal at 9b16840e, each with a url to its section, checked by script against the pinned file. 31 are graded. The other 18 are declared and excluded, each with its reason: client and host obligations, rules that compare two authorization contexts (a run holds one credential), and step-up, a MAY that needs a credential the harness can raise.

Things to look at first

  • The number is a placeholder. The proposal lives in the WG repository, so it has no modelcontextprotocol/modelcontextprotocol PR number, and the traceability tooling drops non-numeric ids. The yaml header explains sep-9998 (9999 was the MCP Events placeholder before SEP-3415 existed) and the scripted rename once a number exists.
  • Two optional diagnostic controls. The hidden-agent, broken-agent and list_changed rows need the server to provoke a state over the wire. The scenarios look for agents_conformance_fixture and agents_conformance_add_agent in tools/list, and report untestable without them, the same pattern as feat(sep-3415): Conformance suite for triggers and events #521.
  • --force. The extension isn't on the spec timeline, so the runner selects these scenarios only with --force.
  • ttlMs and cacheScope are graded as required, because both results are CacheableResult, where the draft schema requires them.

Evidence

Against mcpkit's implementation (examples/agents/discovery --conformance-agents), the result is 28/28 and 4/4. Breaking that implementation four ways, by showing the hidden agent, never sending list_changed, returning a wrong agent_not_found reason, or omitting ttlMs, turns the matching rows red. Running against the Python reference fork is next, once it serves the extension.

npm run build, npm run lint and npm test pass.

Prerequisite knowledge

  • agents-wg#22 at 9b16840e is the text every row quotes. Retrieving Agent Details, Error Handling and Security Implications carry most of the graded rows.
  • AGENTS.md § Scenario design and § Check conventions explain why this is two scenarios, and why a missing control fails rather than skips.
  • feat(sep-3415): Conformance suite for triggers and events #521 shows the same shape for MCP Events, including the diagnostic-control pattern.

…ceholder sep-9998)

agents-wg PR 22 has no number in modelcontextprotocol/modelcontextprotocol
yet, and both traceability filters are numeric, so the rows and check IDs
carry the placeholder 9998. The header explains why and how to rename.

31 graded rows and 18 excluded. Every row quotes the proposal at 9b16840e,
matched with line wrapping ignored, and points at the section it sits
under.
…ged scenarios

Discovery grades the capability, the roster (shape, paging, cache hints,
cards, unique names), the details for every listed agent, tool parity with
tools/list, and the two error reasons. The hidden-agent and broken-agent
rows read their names from the server's agents_conformance_fixture control
and report untestable without it.

List-changed opens a subscriptions/listen stream with agentsListChanged,
grades the acknowledgement either way round, changes the roster through
agents_conformance_add_agent, and waits for the notification and the
re-listed roster.

Registered as pending, since the everything-server does not implement the
extension.
A stateless fixture built per test, conformant by default, with one option
per rule. 40 tests: a conformant run with every check passing, then one
broken rule per test asserting its check flips.
@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@556

commit: 4661c43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant