Skip to main content
Glama

skill_read_asset

Read asset files from a skill directory safely. Retrieves text or base64-encoded content with MIME type and truncation status, preventing path traversal and limiting size.

Instructions

function_purpose: Read a specific asset file within a skill (returns text or base64 data).

Description:

  • Safely reads an asset inside a skill directory, preventing path traversal and limiting size via max_bytes.

  • Returns UTF-8 text when possible, otherwise base64-encoded bytes, including a MIME type guess and truncation flag.

Args:

  • name: str The hyphen-case skill name (must match skill directory)

  • path: str Relative file path within the skill directory

  • max_bytes: int Maximum number of bytes to read (default: 8_388_608)

Returns:

  • dict[str, Any] with:

    • encoding: "text" | "base64"

    • data: str UTF-8 text or base64 string

    • mime_type: str | None Best-effort MIME type guess

    • truncated: bool True if content was cut at max_bytes

Usage:

  • Use after listing assets to fetch the content of a specific file for analysis or display.

  • If the asset is large, consider increasing max_bytes or reading only required portions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathYes
max_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It reveals path-traversal prevention, size limiting via max_bytes, UTF-8 vs base64 fallback, the inclusion of a MIME type guess, and a truncation flag. This is exceptionally transparent for a read operation.

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 uses clear, labeled sections (function_purpose, Description, Args, Returns, Usage) and every sentence carries useful information. It is detailed but not verbose, and the structure makes scanning easy.

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

Completeness5/5

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

The description covers purpose, safety properties, parameters, return format, and usage context. It even notes edge-case behavior like truncation and encoding fallback. For a read tool with an output schema, this is complete and actionable.

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 description coverage is 0%, so the description must compensate entirely. It does: name is defined as 'hyphen-case skill name (must match skill directory)', path as 'Relative file path within the skill directory', and max_bytes with its default. It also describes the return fields, giving complete semantic meaning beyond the bare schema.

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 opens with 'Read a specific asset file within a skill (returns text or base64 data)', using a specific verb and resource. It clearly distinguishes this from sibling tools like skill_list_assets and skill_add_asset, which either list or add assets rather than reading a single asset's content.

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 description explicitly says to 'Use after listing assets to fetch the content of a specific file for analysis or display', which gives clear usage context. It also advises increasing max_bytes for large assets, but does not explicitly mention when not to use the tool or name alternative tools, so it falls short of a 5.

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/tsoernes/skills-mcp'

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