Skip to content

feat(server): response enhancer callback (JS #2161 parity) #926

@bokelley

Description

@bokelley

Gap

JS SDK adcp-client#2161 added a responseEnhancer server config option applied uniformly to: framework tool responses, custom tools (tasks_get), generated get_adcp_capabilities responses, and credential-policy error responses.

Python has no equivalent — grep for response_enhancer / finalizer / enhancer across decisioning/serve.py and server/serve.py returns nothing, and create_adcp_server_from_platform exposes no such hook. Adopters who want to stamp cross-cutting fields on every response must subclass each handler.

Scope

Add a response_enhancer callback to create_adcp_server_from_platform / create_mcp_server, applied at the same finalizer seam JS uses (framework + custom + generated + error responses).

Needs a seam-design decision before implementation — where exactly the callback runs in the response path, and the callback signature (response in → response out), so it covers all four response classes uniformly without breaking validation hooks.

Notes

  • Reference: adcontextprotocol/adcp-client#2161.
  • Single-agent triage verification.
  • Filed no-triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedenhancementNew feature or requestno-triageSkip the Claude triage bot — human or designated agent will handle this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions