Skip to main content
Glama

skill_add_asset

Store an asset file (UTF-8 text or base64) inside a skill directory. Optionally overwrite existing files while safely creating parent folders.

Instructions

function_purpose: Add (or optionally overwrite) a single asset file inside an existing skill directory.

Description:

  • Writes a new file under the skill folder (creating parent directories) while enforcing path safety.

  • Supports text (UTF-8) or base64 content for binary assets (e.g. PDFs, images).

  • Will not overwrite existing files unless overwrite=True.

IMPORTANT: After adding an asset, you should ALWAYS create a note (via skill_store_note) documenting:

  • What the asset contains and its purpose

  • When and why an agent should load/use it

  • Any context needed to understand it

  • Example usage patterns if applicable

This ensures the asset remains discoverable and properly documented for future use.

Args:

  • name: str Skill name (directory must already exist)

  • path: str Relative path inside the skill (e.g. "examples/foo.py")

  • content: str Text content or base64 string

  • encoding: str "text" (default) or "base64"

  • overwrite: bool Allow overwriting when True (default False)

Returns:

  • dict with:

    • written: bool

    • path: str Relative normalized path

    • size: int | None

    • message: str

    • binary: bool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathYes
contentYes
encodingNotext
overwriteNo

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, the description fully carries the transparency burden. It discloses path safety enforcement, parent directory creation, binary support, overwrite behavior, and the return dict. The IMPORTANT note about always creating a documentation note is valuable behavioral guidance.

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 well-structured with function_purpose, description, IMPORTANT callout, and Args/Returns sections. It is front-loaded and organized, though the IMPORTANT note is slightly verbose. Overall it earns its place.

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 prerequisites (existing skill directory), file path rules, encoding, overwrite behavior, return values, and a required follow-up documentation step. This is complete for the tool's complexity and coordinate with the output schema.

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%, but the description compensates by explaining each parameter in the Args section, including types, defaults, and encoding/overwrite semantics. This fully clarifies the meaning of all five parameters 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 clearly states the tool adds (or overwrites) a single asset file in an existing skill directory. The verb 'Add' and the resource 'asset file' are specific, and the scope 'single' distinguishes it from sibling skill_add_assets.

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 provides clear context: existing skill directory, single asset, optional overwrite, and a mandatory follow-up note via skill_store_note. However, it does not explicitly mention when to prefer skill_add_assets for bulk operations or other alternatives, so it stops short of full when/when-not guidance.

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