feat(mcp): improve project context awareness in MCP tool descriptions#274
Open
github-actions[bot] wants to merge 1 commit intomainfrom
Open
feat(mcp): improve project context awareness in MCP tool descriptions#274github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AI agents querying Hookdeck via MCP did not have enough signal in tool descriptions to know that all queries are scoped to an active project. When a user referenced a project by name, agents silently used whatever project was active, returning data from the wrong project with no warning.
Solution
Tool description updates (
tools.go)hookdeck_projects: Replaced the passive description with imperative language making it the required first step when a user references a project by name. Clarifies that all queries are scoped to the active project.hookdeck_connections,hookdeck_events,hookdeck_issues,hookdeck_metrics,hookdeck_requests: Appended "Results are scoped to the active project — callhookdeck_projectsfirst if the user has specified a project."hookdeck_help: Appended a note that all tools operate on the active project.Help text updates (
tool_help.go)hookdeck_projectshelp entry with the same imperative language.Response envelope (
response.go, query tool handlers)Implemented the "Additional Consideration" from the issue: added a
JSONResultWithProjectIDhelper that mergesactive_project_idinto every list/metrics response. Updated list handlers intool_events.go,tool_issues.go,tool_connections.go,tool_requests.go, and all four functions intool_metrics.goto use this helper. This lets agents self-verify that results came from the intended project even after a query runs.