Skip to main content
Glama

全文搜索会话内容

piweb_search_sessions
Read-only

Search all session message bodies for a literal, case-insensitive keyword and return matching session IDs, with results possibly truncated under a 3-second budget.

Instructions

在所有会话的消息正文里做字面量(不区分大小写)搜索,返回命中片段所在的会话 id。服务端有 3 秒时间预算,结果可能被截断(truncated);命中很多时缩小关键词或用 piweb_get_session 细看。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo只看某个项目目录(前缀匹配)
limitNo返回命中条数上限,默认 20
queryYes搜索关键词(字面量,最长 200 字)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuinely useful traits beyond that: literal (non-regex) semantics, case-insensitivity, a 3-second server time budget, and possible truncation of results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight sentence with front-loaded purpose, then the caveat (time budget/truncation) and the alternative. No wasted words, though the semicolon-chained clauses are dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by explaining what is returned (session ids of matched snippets) plus the truncation caveat. Adequate for a read-only search tool; it could add a hint about the snippet/limit behavior on truncation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters are already documented in the schema. The description only echoes 'literal search' and adds case-insensitivity, adding marginal value over the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (literal, case-insensitive search), the precise resource (message bodies across all sessions), and the return shape (session ids of matched snippets). This cleanly distinguishes it from piweb_get_session, which it names, and from piweb_list_sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing: narrow the keyword when there are many hits, or fall back to piweb_get_session for detail. Clear context for when to use it versus drilling in, though it does not state an explicit when-not condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.