Skip to content

feat(mcp): improve project context awareness in MCP tool descriptions#274

Open
github-actions[bot] wants to merge 1 commit intomainfrom
auto-implement-issue-273
Open

feat(mcp): improve project context awareness in MCP tool descriptions#274
github-actions[bot] wants to merge 1 commit intomainfrom
auto-implement-issue-273

Conversation

@github-actions
Copy link
Contributor

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 — call hookdeck_projects first 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)

  • Updated the help overview to show a prominent "All tools operate on the active project" notice.
  • Added the same project-scoping note to each of the five query-tool detailed help entries.
  • Expanded the hookdeck_projects help entry with the same imperative language.

Response envelope (response.go, query tool handlers)

Implemented the "Additional Consideration" from the issue: added a JSONResultWithProjectID helper that merges active_project_id into every list/metrics response. Updated list handlers in tool_events.go, tool_issues.go, tool_connections.go, tool_requests.go, and all four functions in tool_metrics.go to use this helper. This lets agents self-verify that results came from the intended project even after a query runs.

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 this pull request may close these issues.

1 participant