modelcontextprotocol / modelcontextprotocol/modelcontextprotocol

Proposal: Schema - list-schemas - new protocol element

Open
#610 10 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
9.3k
Forks
1.8k
Avg merge
1d 12h
Merged PRs (30d)
25

Description

As originally discussed in:
#358
but now an official proposal.

The MCP protocol is quickly becoming the senses of LLMs. Now that we have both an input and output schema on our tools, we're able to tell the LLM exactly what they can expect from using it.

We can now feel with the tools that we have and grab resources and have structured conversations with prompts. Now we need some way to describe the world. Some way that works across tools and resources within the protocol to describe what we can expect from them. We need to be able to SEE!

The problem is that many tools use the same elements over and over again. If I can only specify the inputSchema and outputSchema to the tool, I end up having to repeat the same data over and over again wasting valuable context.

I propose a new list-schemas RPC command and a Schemas element be added to the central concept of the MCP protocol.

List schemas would return a list of JSON schemas that are named and can be referenced in the tools and resources (and maybe someday other parts of the protocol).

This is quite like the OpenAPI specification itself with it's concept of models.


export interface Schema {
  name: string
  description: string
  schema: {
    type: "object";
    properties?: { [key: string]: object };
    required?: string[];
  }
}

export interface SchemaReference {
  type: "ref/schema";
  /**
   * The name of the schema
   */
  name: string;
}

export interface ListSchemasRequest {}
export interface ListSchemasResponse {
  schemas: Schema[]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the discussion in #358 and compare the existing tools, resources, and prompts protocol elements. Determine how a list-schemas RPC and named schema references should fit the central MCP protocol, including their request and response shape. Done means the proposal has an agreed specification and documented integration points.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.