Files
github--github-mcp-server/pkg/github/__toolsnaps__/search_code.snap
Sam Morrow c6f31f36b6 feat: Add OAuth scopes to tool metadata
- Add pkg/scopes package with OAuth scope constants and utilities
- Add scopes to all ~90 tool definitions using mcp.Tool.Meta field
- Update generate_docs.go to include scopes in README output
- Add comprehensive test coverage for scopes package
- Update all toolsnaps to include _meta.requiredOAuthScopes

Scope assignments follow GitHub OAuth app documentation:
- repo: Most repository operations (private repos)
- public_repo: Star/unstar operations
- notifications: Notification operations
- gist: Gist write operations
- security_events: Code scanning, dependabot, secret scanning
- project/read:project: Project operations
- read:org: Organization/team read operations
- No scope: Public read operations (get_me, list_gists)
2025-12-13 01:22:50 +01:00

49 lines
1.4 KiB
Plaintext

{
"_meta": {
"requiredOAuthScopes": [
"repo"
],
"toolset": "repos"
},
"annotations": {
"readOnlyHint": true,
"title": "Search code"
},
"description": "Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.",
"inputSchema": {
"type": "object",
"required": [
"query"
],
"properties": {
"order": {
"type": "string",
"description": "Sort order for results",
"enum": [
"asc",
"desc"
]
},
"page": {
"type": "number",
"description": "Page number for pagination (min 1)",
"minimum": 1
},
"perPage": {
"type": "number",
"description": "Results per page for pagination (min 1, max 100)",
"minimum": 1,
"maximum": 100
},
"query": {
"type": "string",
"description": "Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more."
},
"sort": {
"type": "string",
"description": "Sort field ('indexed' only)"
}
}
},
"name": "search_code"
}