Skip to main content
Glama
guanyuyan
by guanyuyan

session_export

Export login cookies for a site by URL to back up or move the authenticated session to another machine, optionally saving them as a JSON file.

Instructions

导出某站登录态里的 cookie,便于备份或在另一台机器上导入。

Args: url: 目标站点任一页面 URL(按域名匹配登录态)。 session: 会话名(默认 default)。 path: 可选本地文件路径;给出时把导出 JSON 写入该文件(目录需已存在), 不传则直接在返回里给出 cookies。

Input Schema

NameRequiredDescriptionDefault
urlYes
pathNo
sessionNodefault

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.1

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the burden — and it does disclose the key side effect: if path is given the JSON is written to a local file and the directory must already exist, otherwise cookies come back inline. It omits anything about overwriting an existing file, permission/auth requirements, or the sensitivity of the exported cookies.

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?

Purpose is front-loaded in one sentence and the Args block is terse and useful; every line earns its place. Minor redundancy in restating the default value and the two-line wrap on path.

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?

An output schema exists, so return values needn't be spelled out, and the description's conditional (file vs inline) behavior covers the meaningful return branch. For a tool that writes a credential-bearing file with no annotations, an explicit note on overwrite behavior and the sensitivity of the exported cookies would close the remaining gap.

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

Parameters5/5

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

Schema coverage is 0%, but the description documents all three params with real meaning beyond the schema: url is any page URL of the target site and domain-matching is how the session is resolved, session names the session with a stated default, and path is optional with a directory-must-exist precondition and a defined alternative behavior when omitted.

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 (导出/export) and resource (cookies from a site's login session), with the scope rule '按域名匹配登录态'. It implicitly distinguishes itself from session_import by framing the output as something to back up or import elsewhere, but it never names the sibling or states the boundary explicitly.

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?

The opening sentence gives clear use contexts: backup, or moving a session to another machine. It does not state any exclusions or explicitly point to session_import / session_list as the alternative path, so the when-not guidance is absent.

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