Skip to main content
Glama

让模型给会话起名

piweb_auto_name_session
Idempotent

Generates a session title from its conversation and saves it, matching Pi Web's sidebar auto-naming. Use it to automatically name sessions instead of choosing titles manually.

Instructions

调用 pi 的标题生成,让模型根据对话内容给会话起一个名字并落盘(等价于侧边栏的自动命名)。要花一次模型调用。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionYes会话 id / 名称

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, the description discloses two behavioral traits: it consumes one model call (cost/latency) and it persists the result to disk. The openWorldHint and idempotentHint annotations align with this, and readOnlyHint=false is consistent with writing a name. It stops short of saying what happens to an existing name, which idempotency partially covers.

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

Conciseness5/5

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

Two compact sentences, front-loaded with the action and the mechanism, then the equivalence and cost caveat. No filler.

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?

For a single-parameter tool with no output schema, the description covers mechanism, effect (persisted name), and cost, which is enough to call it correctly. A note on whether an existing name is overwritten would make it fully complete.

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% and the single 'session' parameter is already documented as '会话 id / 名称'. The description adds no format, id-vs-name disambiguation, or validation detail beyond the schema, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb+resource: it invokes pi's title generation so the model names the session from conversation content and writes it to disk. The phrase '等价于侧边栏的自动命名' makes the automatic nature clear, implicitly distinguishing it from the manual piweb_rename_session sibling, though that sibling is never named.

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

Usage Guidelines3/5

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

Usage is implied (call it when you want an auto-generated session name) and the cost warning '要花一次模型调用' is a useful selection consideration. However, there is no explicit when/when-not guidance and no alternative (e.g. piweb_rename_session) is named for the manual case.

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