Skip to content

Align tool safety hints with read-only enforcement and dynamic tool metadata#66

Merged
Slach merged 5 commits intomainfrom
codex/issue-48-tool-safety
Mar 30, 2026
Merged

Align tool safety hints with read-only enforcement and dynamic tool metadata#66
Slach merged 5 commits intomainfrom
codex/issue-48-tool-safety

Conversation

@BorisTyshkevich
Copy link
Copy Markdown
Collaborator

@BorisTyshkevich BorisTyshkevich commented Mar 27, 2026

fix #48

Summary

  • enforce read-only query blocking in the ClickHouse client for non-read statements
  • add and document MCP tool safety hints for execute_query and dynamic view-backed tools
  • preserve dynamic tool title and description metadata from view COMMENT
  • allow dynamic tools to declare openWorldHint while keeping them read-only and non-destructive
  • update server and client tests to cover annotation behavior and read-only enforcement

Testing

  • go test ./pkg/server -run 'TestDynamicToolCommentMetadata|TestRegisterTools_Annotations|TestOpenAPI_DynamicPathsIncluded'
  • go test ./pkg/server ./pkg/clickhouse with repo-local Go cache/temp dirs

@Slach
Copy link
Copy Markdown
Collaborator

Slach commented Mar 27, 2026

@BorisTyshkevich
make rm -rf .gocache add .gocache in .gitignore

Copy link
Copy Markdown
Collaborator

@Slach Slach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.gocache? pepe wtf?

@Slach Slach merged commit 21d59c4 into main Mar 30, 2026
4 checks passed
Slach added a commit that referenced this pull request Mar 30, 2026
Align tool safety hints with read-only enforcement and dynamic tool metadata
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.

Mark dynamic tools as read-only / safe

3 participants