Skip to content

Various tools are missing enumerated values #79

Closed
@williammartin

Description

@williammartin

Description

When running the conformance tests we saw that a lot of the tools schemas were using string types rather than enum types. I would think that the MCP Host would be able to make better use of the fields if it understood the values were constrained.

Specifically, we're looking at:

  • list_issues: direction, sort and state
  • update_issue: state
  • search_code: order
  • search_issues: order and sort
  • search_users: order and sort
        Error:          Received unexpected error:
                        inputSchema mismatch for tool "list_issues":
                          conformance_test.inputSchema{
                                Type: "object",
                                Properties: map[string]any{
                                        "direction": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("asc"), string("desc")},
                                                "type": string("string"),
                                        },
            ...
                                        "sort": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("created"), string("updated"), string("comments")},
                                                "type": string("string"),
                                        },
                                        "state": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("open"), string("closed"), string("all")},
                                                "type": string("string"),
                                        },
                                },
                                Required: {"owner", "repo"},
                          }

                        inputSchema mismatch for tool "update_issue":
                          conformance_test.inputSchema{
                                Type: "object",
                                Properties: map[string]any{
        ...
                                        "state": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("open"), string("closed")},
                                                "type": string("string"),
                                        },
                                        "title": map[string]any{"type": string("string"), ...},
                                },
                                Required: {"owner", "repo", "issue_number"},
                          }

                        inputSchema mismatch for tool "search_code":
                          conformance_test.inputSchema{
                                Type: "object",
                                Properties: map[string]any{
                                        "order": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("asc"), string("desc")},
                                                "type": string("string"),
                                        },
           ...
                          }

                        inputSchema mismatch for tool "search_issues":
                          conformance_test.inputSchema{
                                Type: "object",
                                Properties: map[string]any{
                                        "order": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("asc"), string("desc")},
                                                "type": string("string"),
                                        },
           ...
                                        "sort": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{
                        -                               string("comments"), string("reactions"), string("reactions-+1"),
                        -                               string("reactions--1"), string("reactions-smile"),
                        -                               string("reactions-thinking_face"), string("reactions-heart"),
                        -                               string("reactions-tada"), string("interactions"), string("created"),
                        -                               string("updated"),
                        -                       },
                                                "type": string("string"),
                                        },
                                },
                                Required: {"q"},
                          }

                        inputSchema mismatch for tool "search_users":
                          conformance_test.inputSchema{
                                Type: "object",
                                Properties: map[string]any{
                                        "order": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("asc"), string("desc")},
                                                "type": string("string"),
                                        },
             ...
                                        "sort": map[string]any{
                                                ... // 1 ignored entry
                        -                       "enum": []any{string("followers"), string("repositories"), string("joined")},
                                                "type": string("string"),
                                        },
                                },
                                Required: {"q"},
                          }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions