Skip to content

Various tools are missing pagination property bounds or are not using matching case #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
williammartin opened this issue Apr 3, 2025 · 0 comments · Fixed by #86
Closed
Assignees

Comments

@williammartin
Copy link
Collaborator

Description

When running the conformance tests we saw that a lot of the tools schemas were missing minimum and maximum bounds when it came to pagination properties.

Specifically, we're looking at:

  • search_code: page and perPage
  • search_issues: page and perPage
  • search_users: page and perPage
                               inputSchema mismatch for tool "search_repositories":
                                  conformance_test.inputSchema{
                                        Type: "object",
                                        Properties: map[string]any{
                                                "page": map[string]any{"type": string("number"), ...},
                                -               "perPage": map[string]any{
                                -                       "description": string("Number of results per page (default: 30, max: 100)"),
                                -                       "type":        string("number"),
                                -               },
                                +               "per_page": map[string]any{"description": string("Results per page (max 100)"), "type": string("number")},
                                                "query":    map[string]any{"type": string("string"), ...},
                                        },
                                        Required: {"query"},
                                  }

                                inputSchema mismatch for tool "list_commits":
                                  conformance_test.inputSchema{
                                        Type: "object",
                                        Properties: map[string]any{
...
                                -               "perPage": map[string]any{
                                -                       "description": string("Number of results per page (default: 30, max: 100)"),
                                -                       "type":        string("number"),
                                -               },
                                +               "per_page": map[string]any{"description": string("Number of records per page"), "type": string("number")},
...
                                  }

                                inputSchema mismatch for tool "search_code":
                                  conformance_test.inputSchema{
                                        Type: "object",
                                        Properties: map[string]any{
                                                "order": map[string]any{"enum": []any{string("asc"), string("desc")}, "type": string("string"), ...},
                                                "page": map[string]any{
                                                        ... // 1 ignored entry
                                -                       "minimum": float64(1),
                                                        "type":    string("number"),
                                                },
                                                "per_page": map[string]any{
                                                        ... // 1 ignored entry
                                -                       "maximum": float64(100),
                                -                       "minimum": float64(1),
                                                        "type":    string("number"),
                                                },
                                                "q":    map[string]any{"type": string("string"), ...},
                                        },
                                        Required: {"q"},
                                  }

                                inputSchema mismatch for tool "search_issues":
                                  conformance_test.inputSchema{
                                        Type: "object",
                                        Properties: map[string]any{
                                                "order": map[string]any{"enum": []any{string("asc"), string("desc")}, "type": string("string"), ...},
                                                "page": map[string]any{
                                                        ... // 1 ignored entry
                                -                       "minimum": float64(1),
                                                        "type":    string("number"),
                                                },
                                                "per_page": map[string]any{
                                                        ... // 1 ignored entry
                                -                       "maximum": float64(100),
                                -                       "minimum": float64(1),
                                                        "type":    string("number"),
                                                },
...
                                        },
                                        Required: {"q"},
                                  }

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

It's not clear to me why search_repositories and list_commits have no minimum bounds on page. Maybe an oversight for the anthropic server? However, they also have mismatching cases:

                               inputSchema mismatch for tool "search_repositories":
                                  conformance_test.inputSchema{
                                        Type: "object",
                                        Properties: map[string]any{
                                                "page": map[string]any{"type": string("number"), ...},
                                -               "perPage": map[string]any{
                                -                       "description": string("Number of results per page (default: 30, max: 100)"),
                                -                       "type":        string("number"),
                                -               },
                                +               "per_page": map[string]any{"description": string("Results per page (max 100)"), "type": string("number")},
                                                "query":    map[string]any{"type": string("string"), ...},
                                        },
                                        Required: {"query"},
                                  }

                                inputSchema mismatch for tool "list_commits":
                                  conformance_test.inputSchema{
                                        Type: "object",
                                        Properties: map[string]any{
...
                                -               "perPage": map[string]any{
                                -                       "description": string("Number of results per page (default: 30, max: 100)"),
                                -                       "type":        string("number"),
                                -               },
                                +               "per_page": map[string]any{"description": string("Number of records per page"), "type": string("number")},
...
                                  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant