Skip to main content
Glama

engine_php_save

Save PHP files from provided content or an existing file path copied byte-for-byte. For modules, pass a manifest to rewrite its JSON, preserving the table list and disabled log lines.

Instructions

Save an existing php file. The body comes either as content, or as file - a path on this machine, and then it travels byte for byte and you never retype it. For a module pass manifest to rewrite its .json - all of it but the table list: the engine learns that from the queries the module runs, and a save keeps only the lines you switched off (bare names: log=0).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoPath on this machine, absolute or off the store folder; instead of content.
pathYes
buildNoRaise the build number of the store - the one the page hangs on its css and js. A module does not need it: what a module prints is not held by the browser. Say it only when the same change is meant to make the visitors take fresh styles too.
contentNo
manifestNoSame keys engine_php_load returns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv6.5.1

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that file mode sends bytes 'byte for byte' without retyping, and that manifest saves preserve only lines that were switched off (e.g., 'log=0'). This goes beyond the obvious save semantics and provides useful behavioral detail. It doesn't mention side effects like build increments, but that parameter is documented in 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense sentence but front-loads the core purpose and packs essential details (two body sources, module manifest behavior). It avoids redundancy and stays within ~50 words, making it efficient. The structure is acceptable, though slightly run-on, but information is well-ordered.

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 save tool with 5 params, one required, and a nested manifest object, the description covers the main operational modes (content/file, module manifest) and the byte-for-byte nuance. It does not describe the return value (no output schema), but save tools typically return a simple success indicator. It also doesn't address what happens if both content and file are provided, but that's an edge case. Overall, it's sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60% (3 of 5 params described). The description compensates by clarifying that 'content' and 'file' are alternative body sources, and explains the manifest's purpose and behavior. It implicitly clarifies 'path' as the target location. It adds meaning beyond the schema for content and manifest, though it doesn't elaborate on 'build' (schema does) or provide syntax details for file paths.

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 a clear verb+resource: 'Save an existing php file.' It distinguishes from siblings by specifying 'existing' (vs add for new files) and explains the module manifest rewrite case, which is unique to this save operation. The purpose is unambiguous and sets it apart from engine_php_add, rename, remove, and load.

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 implies when to use it: for existing files, and for modules to rewrite manifests. It doesn't explicitly name alternatives like engine_php_add for new files, but the word 'existing' and the module-specific note give clear context. It lacks an explicit 'when not to use' statement, but the intended usage is inferable.

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