Model Context Protocol › Capability negotiation

Michael BrenndoerferDecember 1, 20263 min read
Language AI HandbookAll chapters
Part 49 of 67Long-Horizon Agents and Interoperability
Chapter 377Model Context Protocol › Capability negotiation
Reading section 6 of 14 · Capability negotiation · 3 minSection 6 of 14 · 3 min

Section 6 of 14 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Capability declarations help a peer decide whether an operation is appropriate. The server declaration says which features it implements. Client capability information on a modern request lets the server account for what the client can handle for that request. Compare capability information on the relevant connection when the host has multiple connections. An operation that works against a library server says little about what a workshop server implements, even if both speak MCP.

Picture three fictional connections. The catalog provides tools and resources. The style guide offers resources and prompts. The workshop offers tools and prompts. Their declarations are independent. Keeping a matrix of the operation families each test server implements catches a common integration mistake, where the host copies capabilities from one connection into another. The matrix below records those three fixture declarations. Authorization and individual tool inventories belong in separate records.

PythonIn [7]
CollapseExpand
capability_families = ("Tools", "Resources", "Prompts")
fixture_features = {
    "Reading catalog": {"Tools", "Resources"},
    "Style guide": {"Resources", "Prompts"},
    "Workshop": {"Tools", "Prompts"},
}
capability_matrix = [
    [family in supported for family in capability_families]
    for supported in fixture_features.values()
]
assert capability_matrix == [
    [True, True, False],
    [False, True, True],
    [True, False, True],
]
VisualizationOut [8]
CollapseExpand
A three by three matrix shows that the reading catalog offers tools and resources, the style guide offers resources and prompts, and the workshop offers tools and prompts.
Each fictional connection maintains its own feature declaration. A host should consult the connection that will receive the operation.

The two connections with tools can also publish a tool with the same local name. An application can keep those entries distinct internally by storing the connection and the tool name together. It can label the two choices differently when it presents them. Include the destination in an approval prompt when a user could reasonably choose either. This way the action a user sees can match the server to which the host sends the call.

A capability can help select a call, and the server's available tool list can depend on the requesting identity. The application still checks whether a specific action is appropriate to expose in that interface. For example, an operator may connect a workshop server that supports tools while the reading interface never offers the workshop's operations. The host filters that view under its own policy even when it connects successfully.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy