Skip to main content
Glama

ruyi_set_extra_headers

Set extra HTTP headers for all subsequent requests to inject authentication tokens, custom user agents, or other necessary values.

Instructions

为所有后续请求附加额外的 HTTP Headers。用于注入认证 token、自定义 UA 等。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headersYesKey-value 键值对,如 {"X-Token": "abc123", "X-Device-Id": "device1"}
pageIdxNo
Behavior2/5

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

No annotations are provided, so the description must disclose side effects. It only states that headers are added to all future requests, but fails to mention whether the change is persistent across navigation, how to clear/reset headers, whether existing headers are overridden, or if it applies to all frames/websocket requests. This is a significant transparency gap for a stateful mutation tool.

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?

The description is two short sentences: one for core behavior and one for typical use cases. It is front-loaded and efficient, with no wasted words. However, it could benefit from expanding on critical caveats without becoming verbose.

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

Completeness2/5

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

Given the lack of annotations, the absence of an output schema, and the presence of a potentially stateful operation, the description is insufficient. It does not explain the lifecycle of added headers (e.g., how to revert), the meaning of 'pageIdx', or any side effects on request/response interception, making it incomplete for autonomous decision-making.

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

Parameters2/5

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

The schema covers only 50% of parameters: 'headers' is described, but 'pageIdx' has no description. The tool description does not compensate for the missing 'pageIdx' semantics, leaving an agent without guidance on how to use it. The description adds minimal value beyond the schema for the headers parameter itself.

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?

The description uses a specific verb ('附加' / 'attach') and clearly states it applies to all subsequent HTTP requests. It also gives concrete use cases (auth token, custom UA), which helps distinguish it from cookie-related siblings like ruyi_set_cookies.

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?

The description provides use cases ('用于注入认证 token、自定义 UA 等') but does not explicitly mention when not to use it or contrast with alternative tools like ruyi_emulate_useragent, which also handles custom UA. This could cause ambiguity for an agent choosing between tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Facetomyself/ruyi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server