Skip to content

Make list commands MCP spec complaint in JSON mode #183

Open

Description

@jancurn

The tools-list, prompts-list, tasks-list, and resources-list commands now return objects that are not consistent with ListToolsResult, ListPromptsResult, ListTasksResult, and ListResourcesResult (see https://modelcontextprotocol.io/specification/2025-11-25/schema) in --json mode.

Update the commands to return objects consistent with the above. Skip the nextCursor, as pagination is done implicitly by mcpc, and merge the _meta fields and [key: string]: unknown; fields, in the order of the pagination pages. Also, update the "JSON output (--json):" section in help to reference the above objects and link to them in MCP spec.

Beware that this is a breaking change

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions