Skip to content

feat: adding correct tool annotations#184

Open
vanhtuan0409 wants to merge 1 commit into
ClickHouse:mainfrom
vanhtuan0409:set-tool-annotations
Open

feat: adding correct tool annotations#184
vanhtuan0409 wants to merge 1 commit into
ClickHouse:mainfrom
vanhtuan0409:set-tool-annotations

Conversation

@vanhtuan0409

@vanhtuan0409 vanhtuan0409 commented May 22, 2026

Copy link
Copy Markdown

Summary

  • Add MCP ToolAnnotations with readOnlyHint to all registered tools
  • list_databases, list_tables, and run_chdb_select_query are marked as readOnlyHint=True (always read-only)
  • run_query annotation is set dynamically based on CLICKHOUSE_ALLOW_WRITE_ACCESS: read-only by default, non-read-only when write access is enabled

Motivation

MCP clients (e.g. Claude Code, ChatGPT) use tool annotations to decide whether to prompt users for confirmation before executing a tool call. Without annotations, clients may conservatively require confirmation for every call — even read-only ones like listing databases or tables.

Test plan

  • Verify list_databases, list_tables, run_chdb_select_query expose readOnlyHint=true in tool metadata
  • Verify run_query exposes readOnlyHint=true when CLICKHOUSE_ALLOW_WRITE_ACCESS is unset or false
  • Verify run_query exposes readOnlyHint=false when CLICKHOUSE_ALLOW_WRITE_ACCESS=true

🤖 Generated with Claude Code

@CLAassistant

CLAassistant commented May 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants