Skip to main content
Glama

读取资源内容(按 URL)

resources_get

Read a web resource's content by URL, like opening a file in DevTools Sources. Applies UTF-8 correction to prevent mojibake in Chinese text and returns binary media as base64.

Instructions

按 URL 读取页面资源的内容,等同于在开发者工具 Sources 面板里点开某个文件看源码。会自动采用 UTF-8 纠偏,避免无 charset 的中文文本变乱码。图片/音视频等二进制会返回 base64。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes资源 URL,可用 resources_list 或 network_list 获取
asBase64No强制按 base64 返回原始字节,适合图片/音视频
maxCharsNo最多返回字符数,默认 20000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and delivers real behavioral detail: automatic UTF-8 correction to avoid mojibake in Chinese text, and base64 output for binary media. It does not mention permissions, truncation side effects beyond maxChars, or error behavior, but the encoding/binary disclosure is genuinely useful beyond the schema.

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?

Three short sentences, front-loaded with the core action, then the encoding caveat and the binary return behavior. Every sentence conveys distinct information with 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 read-only fetch tool with no output schema and no annotations, the description covers the return shape (text vs base64) and encoding handling. It leaves error and permission behavior unstated, but the essentials an agent needs to call it correctly are present.

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 url, asBase64, and maxChars are already documented. The description echoes the base64 behavior for binaries but adds no syntax or format detail beyond what the schema states, so the baseline of 3 applies.

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 and resource (read page resource content by URL) and clarifies scope with a concrete analogy, likening it to opening a file in the DevTools Sources panel. This clearly separates it from siblings like resources_list or network_list, which enumerate rather than fetch content.

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 through the analogy (fetch a known resource's body) and the schema points to resources_list/network_list as URL sources, but the description itself gives no explicit when-to-use versus alternatives such as network_body or page_dom. An agent must infer the distinction.

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