Skip to main content
Glama
hooplus1ce

DrissionPage-MCP

by hooplus1ce

写入 cookies

cookies_set

Set cookies in a browser tab to reuse login sessions. Provide name, value, and domain for each cookie; optionally specify a tab ID.

Instructions

向标签页写入 cookies(复用登录态时使用)。每条 cookie 需含 name/value/domain。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNo标签页 id,省略时用最新标签页
cookiesNocookie 字典列表,如 [{"name": "token", "value": "xxx", "domain": ".example.com"}]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Describes the action as writing cookies but does not mention side effects such as overwriting existing cookies, requiring permissions, or whether it merges or replaces. The annotation readOnlyHint: false aligns with the description, so no contradiction, but the description lacks depth about behavior.

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?

The description is concise and to the point, with no unnecessary information. It effectively communicates the purpose and key constraints in a single sentence.

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?

The description covers the essential context for using the tool: purpose, target (tab), and required cookie fields. It does not mention return values or potential errors, but the presence of an output schema reduces the need for that. The description is adequate for a simple write operation.

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

Parameters4/5

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

The description adds important guidance for the cookies parameter by stating each cookie must include name/value/domain. It does not elaborate on tab_id beyond the schema's own description, but the schema already covers that. Overall, it supplements the schema meaningfully.

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?

Clearly states it writes cookies to a tab, with the purpose of reusing login state. The verb 'write' and resource 'cookies' are specific, and it distinguishes from siblings like cookies_get and cookies_clear.

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?

Provides a clear use case ('when reusing login state') that indicates when to use this tool. It does not explicitly mention alternatives, but the context is sufficient for typical usage.

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