Low Risk

SearchLog

搜索CLS日志内容。在指定日志主题和时间范围内搜索日志,支持复杂查询语法和统计分析。 重要:务必先使用 TextToSearchLogQuery 工具生成 CQL 查询语句! TextToSearchLogQuery 能自动适配日志主题索引配置,确保字段名称准确、语法正确。 警告:如果不使用 TextToSearchLogQuery 生成 CQL,直接手写很可能出现字段名称错误、语法不规范等问题导致查询失败。 与 DescribeLogHistogram 的分工: - SearchLog 支持 SQL 分析(管道符 |),可实现按时间分组统计、多维聚合等复杂分析,功能更强大,优先使用 -...

Risk signalsAccepts freeform code/query input (Query) · High parameter count (11 properties)

Part of the Cls server.

SearchLog is read-only, but an agent in a loop can still rack up calls and cost. PolicyLayer caps every call before it runs. Live in minutes.

SECURE CLS →

Free to start. No card required.

AI agents call SearchLog to retrieve information from Cls without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.

Even though SearchLog only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.

Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "SearchLog": {}
  }
}

See the full Cls policy for all 19 tools.

Get this rule live on your own Cls server in minutes. PolicyLayer enforces it on every call, before it runs.

ENFORCE ON MY CLS →

View all 19 tools →

These attack patterns abuse exactly the kind of access SearchLog gives an agent. Each links to the full case and the policy that stops it:

Browse the full MCP Attack Database →

Every attack above starts with a tool call. PolicyLayer checks each one against your policy first, so SearchLog only ever does what you allow.

SECURE CLS →

Other read tools across the catalogue. The same approach applies to each: allow, with a rate cap to control cost.

What does the SearchLog tool do? +

搜索CLS日志内容。在指定日志主题和时间范围内搜索日志,支持复杂查询语法和统计分析。 重要:务必先使用 TextToSearchLogQuery 工具生成 CQL 查询语句! TextToSearchLogQuery 能自动适配日志主题索引配置,确保字段名称准确、语法正确。 警告:如果不使用 TextToSearchLogQuery 生成 CQL,直接手写很可能出现字段名称错误、语法不规范等问题导致查询失败。 与 DescribeLogHistogram 的分工: - SearchLog 支持 SQL 分析(管道符 |),可实现按时间分组统计、多维聚合等复杂分析,功能更强大,优先使用 - DescribeLogHistogram 仅返回时间和计数两个维度,适用于不支持 SQL 分析的日志主题(如低频存储主题) 后续操作: - 查看某条日志的上下文:使用返回结果中的 PkgId、PkgLogId、Time 调用 DescribeLogContext 工具 CQL(Cloud Query Language)语法说明: 1. 全文检索:直接输入关键词,如 error;多关键词空格分隔默认 OR 关系 2. 键值检索:key:value 格式,如 level:ERROR、status:404 3. 短语检索:双引号包裹,如 name:"john Smith" 4. 模糊检索:* 匹配多字符,? 匹配单字符,如 host:www.test*.com 5. 数值比较:支持 >、>=、<、<=、=,如 status:>400 6. 范围检索:使用比较运算符组合,如 status:>=400 AND status:<500 7. 逻辑运算符:AND、OR、NOT,支持括号组合,如 (level:ERROR OR level:WARNING) AND pid:1234 8. SQL 分析(管道符 |): - 聚合统计:* | SELECT count(*) AS total - 分组统计:* | SELECT count(*) AS cnt, level GROUP BY level - 排序限制:* | SELECT count(*) AS cnt, host GROUP BY host ORDER BY cnt DESC LIMIT 10 - 条件过滤:* | SELECT * WHERE response_time > 1000. It is categorised as a Read tool in the Cls MCP Server, which means it retrieves data without modifying state.

How do I enforce a policy on SearchLog? +

Register the Cls MCP server in PolicyLayer and add a rule for SearchLog: 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 Cls. Nothing to install.

What risk level is SearchLog? +

SearchLog is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit SearchLog? +

Yes. Add a rate_limit block to the SearchLog 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 SearchLog completely? +

Set action: deny in the PolicyLayer policy for SearchLog. 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 SearchLog? +

SearchLog is provided by the Cls MCP server (cls-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Cls tool call.

Deterministic rules across all 19 Cls tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Free to start. No card required.

4,600+ MCP servers and 31,000+ tools scanned and risk-classified.

// GET IN TOUCH

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

Message sent.

We'll get back to you soon.