New Your team’s decisions, in one playbook every coding agent works from. Never answer your agent twice

siyuan_query_sql

思源 SQL 查询工具 - 执行 SQLite 查询语句 你是思源小助手,你需要根据用户需求,编写符合思源笔记数据库结构的 SQL 查询语句。在必要时,解释查询结果的含义和用途。 要求 SQL 语法规范: 在默认的情况下,用户可以在思源的嵌入块中输入 SQL 代码查询,此时 SQL 查询语句必须以 select * from blocks 开头:只允许查询 block 表,且不允许单独查询字段 面向开发者的高级用法:用户还可以调用后端 API 接口,发送 SQL 查询,此时是可以使用更普遍的 SQL 语法结构的(查询别的表,返回特定字段) 使用 SQLite 的语法,如 strftime...

SERVERMartin MCP Toolbox SOURCE2234839/mcpserver
High RISK CLASS
Category Execute
Parameters 00 required
Recommended Rate-limitedsee the rule below
Registry record Grade C, identity unverified Pull the record →

This record as markdown: /tools/2234839-mcpserver/siyuan-query-sql.md

What siyuan_query_sql does on Martin MCP Toolbox

AI agents invoke siyuan_query_sql to trigger actions in Martin MCP Toolbox. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

Why siyuan_query_sql is rated High

This tool executes arbitrary SQLite SQL queries against SiYuan Notes' database. While the description emphasizes SELECT queries, it explicitly allows 'more universal SQL syntax' via the backend API, which could include destructive statements (DROP, DELETE, UPDATE). Even limited to SELECT, executing arbitrary queries against a local database is Execute-level risk.

From the tool's definition 执行 SQLite 查询语句 (execute SQLite query statements); 'siyuan_query_sql' runs arbitrary SQL including queries against multiple tables and specific fields via backend API

Questions about siyuan_query_sql

What does the siyuan_query_sql tool do? +

思源 SQL 查询工具 - 执行 SQLite 查询语句 你是思源小助手,你需要根据用户需求,编写符合思源笔记数据库结构的 SQL 查询语句。在必要时,解释查询结果的含义和用途。 要求 SQL 语法规范: 在默认的情况下,用户可以在思源的嵌入块中输入 SQL 代码查询,此时 SQL 查询语句必须以 select * from blocks 开头:只允许查询 block 表,且不允许单独查询字段 面向开发者的高级用法:用户还可以调用后端 API 接口,发送 SQL 查询,此时是可以使用更普遍的 SQL 语法结构的(查询别的表,返回特定字段) 使用 SQLite 的语法,如 strftime 函数处理时间。 默认情况下,查询结果最多返回 64 个块,除非明确指定了 limit xxx 输出:将查询语句放在一个 \. It is categorised as a Execute tool in the Martin MCP Toolbox MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on siyuan_query_sql? +

Register the Martin MCP Toolbox MCP server in PolicyLayer and add a rule for siyuan_query_sql: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Martin MCP Toolbox. Nothing to install.

What risk level is siyuan_query_sql? +

siyuan_query_sql is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit siyuan_query_sql? +

Yes. Add a rate_limit block to the siyuan_query_sql rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block siyuan_query_sql completely? +

Set action: deny in the PolicyLayer policy for siyuan_query_sql. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides siyuan_query_sql? +

siyuan_query_sql is provided by the Martin MCP Toolbox MCP server (2234839/mcpserver). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on Martin MCP Toolbox, and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of Martin MCP Toolbox's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.