Title: Gate tools/list on 'handler overrode this method' — stop not_supported defaults from polluting the advertised surface · Issue #220 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: Gate tools/list on 'handler overrode this method' — stop not_supported defaults from polluting the advertised surface · Issue #220 · adcontextprotocol/adcp-client-python
X Title: Gate tools/list on 'handler overrode this method' — stop not_supported defaults from polluting the advertised surface · Issue #220 · adcontextprotocol/adcp-client-python
Description: Summary ADCPHandler auto-registers all ~57 AdCP tools on every server started via create_mcp_server() / create_a2a_server(), including ones where the subclass inherits the base class's not_supported default. The result: an agent that imp...
Open Graph Description: Summary ADCPHandler auto-registers all ~57 AdCP tools on every server started via create_mcp_server() / create_a2a_server(), including ones where the subclass inherits the base class's not_supporte...
X Description: Summary ADCPHandler auto-registers all ~57 AdCP tools on every server started via create_mcp_server() / create_a2a_server(), including ones where the subclass inherits the base class's not_supp...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/220
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Gate tools/list on 'handler overrode this method' — stop not_supported defaults from polluting the advertised surface","articleBody":"## Summary\n\n`ADCPHandler` auto-registers all ~57 AdCP tools on every server started via `create_mcp_server()` / `create_a2a_server()`, including ones where the subclass inherits the base class's `not_supported` default. The result: an agent that implements `get_products` and 2-3 other tools still advertises all 57 in `tools/list`. With Pydantic-generated schemas averaging 300-600 tokens each after `$defs` resolution, that's 20-30K tokens of tool metadata shipped to every client on connect.\n\nNoted by @agentic-product-architect in the PR #219 review:\n> Today this is tolerable because AdCP agents are called by other agents with 200K+ windows. In 12 months, when AdCP agents get consumed by lighter-weight orchestrators (ChatGPT app, Claude skill, mobile agent), advertising the full surface will look profligate.\n\n## Proposed fix\n\nAdd a registration-time filter: only advertise tools whose handler method was actually overridden by the subclass. The information is knowable:\n\n```python\n# In adcp.server.mcp_tools.get_tools_for_handler():\nhandler_cls = type(handler)\nfor tool_def in ADCP_TOOL_DEFINITIONS:\n method_name = tool_def[\"name\"]\n own_method = getattr(handler_cls, method_name, None)\n base_method = getattr(ADCPHandler, method_name, None)\n if own_method is base_method:\n continue # subclass inherited the not-supported stub; skip advertising\n tools.append(tool_def)\n```\n\nKnobs to consider:\n- Escape hatch for agents that want to advertise a spec-mandated tool even though they haven't implemented it (e.g. `get_adcp_capabilities` is the handshake and must always be present — it's a special case already).\n- Per-protocol handler classes (`GovernanceHandler`, `ContentStandardsHandler`, etc.) — the override check should walk the MRO stopping at the SDK-provided base.\n- `advertised: bool` class attribute on base methods as an opt-in override.\n\n## Tradeoffs\n\n- Subclasses that intentionally want to expose a not_supported tool (to declare \"this agent knows about X but can't do it\") lose that ability unless we add the opt-in escape hatch.\n- Spec-compliance tests that call every tool and expect either a real response or `not_supported` need to adapt — the tool simply won't be listed.\n- Docs need to say \"override the method = advertise the tool.\"\n\n## Context\n\nTracked from PR #219 expert review. Not breaking for existing downstreams at registration-time (the same handler still works), but observably changes `tools/list` output, so ship with a CHANGELOG entry.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-04-20T06:03:28Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/220"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:da42c981-2b5e-bd4d-b4c1-d50c1aade606 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E880:3A4875:BC9D91:FC44ED:6B00F6AA |
| html-safe-nonce | 5d2273f7d0f311aea3e05a4d4e4933ee7559fb0957da56363ff0115c499c8562 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODgwOjNBNDg3NTpCQzlEOTE6RkM0NEVEOjZCMDBGNkFBIiwidmlzaXRvcl9pZCI6IjgyOTcyNjc3ODI3MTQ3MTc4NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c111dfba086d3b8640885fea9909b225a7cba269dc5b8f1a893b54720a5fbf89 |
| hovercard-subject-tag | issue:4293459335 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/220/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a80f35fd32206bdc4f913a586bba3224e949b808030019d21469d52a3fa311b7/adcontextprotocol/adcp-client-python/issues/220 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a80f35fd32206bdc4f913a586bba3224e949b808030019d21469d52a3fa311b7/adcontextprotocol/adcp-client-python/issues/220 |
| og:image:alt | Summary ADCPHandler auto-registers all ~57 AdCP tools on every server started via create_mcp_server() / create_a2a_server(), including ones where the subclass inherits the base class's not_supporte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width