Skip to content

Make list commands MCP spec complaint in JSON mode #183

@jancurn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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