Skip to main content
Glama

write_project_file

Creates or writes project files with automatic directory creation, supporting UTF-8 text and base64-encoded binaries. Also enables bootstrapping new projects by writing an index.html.

Instructions

Escribe (o crea) un archivo dentro de un proyecto del workspace: HTML, CSS, SVG, JSON… Crea los directorios necesarios. Para binarios (PNG/JPG/MP4) usa encoding=base64. Permite crear un proyecto nuevo desde cero escribiendo su index.html.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRuta relativa dentro del proyecto, ej 'index.html' o 'assets/z.png'
contentYesContenido (texto UTF-8, o base64 si encoding=base64)
projectYesNombre del proyecto (se crea si no existe)
encodingNoDef utf8

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. It mentions creating directories and supporting base64, but does not state whether it overwrites existing files, what happens if a file exists, or any error conditions. This is a significant gap for a file-writing tool.

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 front-loaded: it states the primary action first, then lists specifics. Every sentence adds value, and there is no fluff. It's well-organized for an agent to parse quickly.

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

Completeness3/5

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

The description covers the core behaviors needed to invoke the tool: file writing, directory creation, base64 encoding, and project creation. However, it omits details like return value, error handling, and overwrite semantics, which are relevant for an agent to interpret the outcome. Given no output schema, this is a moderate gap.

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?

The schema already describes all parameters with 100% coverage. The description adds the note about using base64 for binaries and that directories are created as needed, providing slight extra context. However, it doesn't go beyond what the schema already conveys for path and content.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool writes (or creates) a file within a project, lists supported file types, and mentions directory creation and base64 support. It also notes it can create a new project by writing index.html, which adds context. However, it does not explicitly contrast with the sibling create_project, so differentiation is incomplete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives usage guidance for the encoding parameter (use base64 for binaries) but does not explain when to use this tool versus the sibling create_project or other file operations. There is no mention of when not to use this tool or any alternatives, leaving the agent to infer selection from context.

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