Skip to main content
Glama

write_html_file

Writes HTML tool files into a workspace using relative paths and automatically creates intermediate directories. Use it to save CSS, JS, or markup content in the correct HTML tool folder.

Instructions

Write content to a file inside an HTML tool folder in a workspace. The path must be relative to the workspace (e.g. "resources/html/my-tool/style.css"). Creates intermediate directories as needed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspacePath": "<workspacePath>",
      "filePath": "<filePath>",
      "content": "<content>"
    },
    "name": "write_html_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesFull file content to write
filePathYesFile path relative to the workspace root (e.g. "resources/html/my-tool/script.js")
workspacePathYesAbsolute path to the workspace directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden of describing a mutation. It does usefully disclose that intermediate directories are created automatically, which the schema does not state. However, it omits critical mutation behavior: whether an existing file is overwritten, whether writes are atomic, and whether any permissions or workspace-level constraints apply.

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?

Three short sentences, front-loaded with the action, then the path constraint, then the directory-creation behavior. No filler. The inline example largely duplicates the schema's own example for filePath, which is the only mild redundancy.

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?

All three required parameters are documented and there is no output schema to explain, so the basics are covered. But for a write tool with zero annotation coverage, the definition stops short of stating overwrite semantics and error behavior, which are the details an agent most needs before invoking it.

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%: workspacePath, filePath, and content are each documented in the schema, including an example path format. The description restates the relative-path requirement and adds a second example, but adds no new meaning such as path restrictions or content encoding. Baseline 3 applies.

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?

Uses a specific verb and resource: 'Write content to a file inside an HTML tool folder in a workspace', which is clearly a full-file write. It is distinguishable from replace_in_html_file in spirit (whole-file write vs. substitution) but never names or contrasts with any sibling, so the discrimination is left to inference.

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?

There is no when-to-use or when-not-to-use guidance. With siblings like replace_in_html_file for partial edits, an explicit 'use this for full-file writes; use replace_in_html_file for targeted edits' would have been valuable, and it is absent. The reader must infer the selection rule from the verb alone.

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