You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add get_readme tool and refactor reference parsing
- Add new get_readme MCP tool to fetch README files from GitHub repositories
- Support both README.md and readme.md filename variations
- Add support for action.yaml extension (in addition to action.yml)
- Refactor reference parsing into shared ref.go module
- Unify ActionRef and RepoRef into single Ref struct with flexible parsing
- Add comprehensive tests for reference parsing
- Reuse FetchRawFile helper for both actions and README fetching
Breaking changes: None - all existing functionality maintained
Closes #N/A
// Register get_action_parameters tool with Sentry tracing
31
30
mcp.AddTool(server, &mcp.Tool{
32
31
Name: "get_action_parameters",
33
32
Description: "Fetch and parse a GitHub Action's action.yml file. Returns the complete action.yml structure including inputs, outputs, runs configuration, and metadata.",
Description: "Fetch the README.md file from a GitHub repository. Takes a repository reference (e.g., 'owner/repo@main' or 'owner/repo'). If no ref is provided, defaults to 'main' branch.",
// GetReadmeArgs defines the parameters for the get_readme tool.
62
+
typeGetReadmeArgsstruct {
63
+
RepoRefstring`json:"repoRef" jsonschema:"GitHub repository reference (e.g., 'owner/repo@main' or 'owner/repo'). If no ref is provided, defaults to 'main'."`
64
+
}
65
+
66
+
// handleGetReadme handles the get_readme tool call.
0 commit comments