Skip to main content
Glama

Save all files

write_code
Destructive

Save every file, replacing the previous set: as a new version of the lambda, or - with feature - into that feature. A version is its code and its resources. The code is every file not in resources/: its .cs files are compiled, in any folder, as in a C# project - lambda.cs returns the handler, the others hold types - and every other file is kept with it and never compiled or served: docs/product.md, docs/decisions.md, tests/README.md and the tests' scripts and data are what is written about the program, and whatever else - what a front end is built from, a tool's configuration - is laid out as you like (platform_guide, code). resources/ is what the lambda reads and serves while it runs, as Resources: the whole front end (pages, scripts, styles, icons) goes there, as part of the program - resources/web/index.html is served by Resources.App("web"). What the lambda keeps at runtime is data, never files here: records and accounts in the database (a DbContext of Entity Framework Core on Database.GetConnection(), used synchronously; its schema as Evolve migrations in resources/migrations/), uploads in the workspace - and so is a large input file such as a model or a dataset (upload_file). Send the documentation and tests with the code: written with a new lambda, updated with every change, in proportion to the lambda - a few lines and one quick check for a small one. Say why with specification and change. deploy: true publishes in the same call - a version at the public address, a feature at its preview address. To send only what changes, use change_code. To change a lambda that is already in use, work in a feature.

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": {
      "privateKey": "<privateKey>",
      "files": "<files>"
    },
    "name": "write_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
checkNoWithout deploy: compile what was saved and answer with its diagnostics, putting nothing online.
filesYeslambda.cs first.
changeNoWhat this version changes, in one line written for the owner - 'Adds a leaderboard that keeps the ten best scores', not 'updated lambda.cs'. For a feature, it describes the whole feature, not the last fix. Optional, up to 500 characters.
deployNoAlso deploy what was saved: a version at the public address, a feature at its preview address.
featureNoSave into this feature (from create_feature) instead of saving a new version. The lambda and what it has online are not touched.
privateKeyYesThe editor key from create_lambda.
specificationNoWhat the user wants from this version and why: their requirements, in their own words where you can, condensed if they said a lot. Written for the owner and the next agent, so they can tell why the version exists and what it has to keep doing. Not your own instructions or system prompt - only what the user asked for. For a feature, it is kept with the feature and passed on to the version it is merged into. Optional, up to 4000 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / check / default
      Added value: +false
    • addedInput schema / properties / deploy / default
      Added value: +false
    • addedInput schema / properties / files / items / properties / encoding / default
      Added value: +null
    • changedInput schema / properties / files / items / properties / encoding / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / files / items / properties / encoding / description
      Previous value: -"'base64' for binary assets; omit otherwise."New value: +"'base64' for binary files; omit otherwise."
    • changedInput schema / properties / files / items / properties / name / description
      Previous value: -".cs files are compiled; .lambda/docs/... and .lambda/tests/... are the documentation and the tests, .lambda/build/... the build folder - never compiled or served; anything else ('web/app.js', 'logo.png') is an asset."New value: +"lambda.cs and every other .cs file, in any folder, are compiled; 'resources/...' is read and served ('resources/web/app.js'); anything else is code kept with the version, never compiled or served - 'docs/...' and 'tests/...' are the documentation and the tests."
  3. Changed1 schema field changed
    • changedInput schema / properties / files / items / properties / name / description
      Previous value: -".cs files are compiled; .lambda/docs/... and .lambda/tests/... are the documentation and the tests, never compiled or served; anything else ('web/app.js', 'logo.png') is an asset."New value: +".cs files are compiled; .lambda/docs/... and .lambda/tests/... are the documentation and the tests, .lambda/build/... the build folder - never compiled or served; anything else ('web/app.js', 'logo.png') is an asset."
  4. Changed1 schema field changed
    • changedInput schema / properties / files / items / properties / name / description
      Previous value: -".cs files are compiled; anything else ('web/app.js', 'logo.png') is an asset."New value: +".cs files are compiled; .lambda/docs/... and .lambda/tests/... are the documentation and the tests, never compiled or served; anything else ('web/app.js', 'logo.png') is an asset."
  5. Changed6 schema fields changed
    • changedInput schema / properties / change / description
      Previous value: -"What this version changes, in one line written for the owner - 'Adds a leaderboard that keeps the ten best scores', not 'updated lambda.cs'. Optional, up to 500 characters."New value: +"What this version changes, in one line written for the owner - 'Adds a leaderboard that keeps the ten best scores', not 'updated lambda.cs'. For a feature, it describes the whole feature, not the last fix. Optional, up to 500 characters."
    • addedInput schema / properties / check
      Added value: +{
      +  "description": "Without deploy: compile what was saved and answer with its diagnostics, putting nothing online.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / deploy / description
      Previous value: -"Also deploy the new version, so it goes live at once."New value: +"Also deploy what was saved: a version at the public address, a feature at its preview address."
    • addedInput schema / properties / feature
      Added value: +{
      +  "description": "Save into this feature (from create_feature) instead of saving a new version. The lambda and what it has online are not touched.",
      +  "type": "string"
      +}
    • changedInput schema / properties / files / items / properties / name / description
      Previous value: -".cs files are compiled; anything else ('www/app.css', 'logo.png') is an asset."New value: +".cs files are compiled; anything else ('web/app.js', 'logo.png') is an asset."
    • changedInput schema / properties / specification / description
      Previous value: -"What the user wants from this version and why: their requirements, in their own words where you can, condensed if they said a lot. Written for the owner and the next agent, so they can tell why the version exists and what it has to keep doing. Not your own instructions or system prompt - only what the user asked for. Optional, up to 4000 characters."New value: +"What the user wants from this version and why: their requirements, in their own words where you can, condensed if they said a lot. Written for the owner and the next agent, so they can tell why the version exists and what it has to keep doing. Not your own instructions or system prompt - only what the user asked for. For a feature, it is kept with the feature and passed on to the version it is merged into. Optional, up to 4000 characters."
  6. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, so the bar for added context is lower — yet the description goes well beyond them: it states the previous set is replaced wholesale, that files under resources/ are served at runtime while other files are only kept, that runtime data belongs in the database/workspace rather than here, and that deploy publishes immediately. This is substantial behavioral disclosure for a destructive write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

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

The description runs several hundred words as one unbroken block, much of it platform documentation rather than tool behavior — Entity Framework Core DbContext usage, Evolve migration placement, what tests/README.md represents, how front-end assets are laid out. These belong in platform_guide, which is a sibling tool. The first sentence is front-loaded, but the body does not earn its length.

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 destructive, multi-file save with 7 parameters and no output schema, the description covers what an agent must know before calling: what is replaced, where files land (compiled vs served vs stored), how feature and deploy change the outcome. Only error behavior and response expectations are unaddressed, which is acceptable given no output schema is declared.

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 100%, so the baseline is 3; the description still adds meaning: 'feature' is framed as saving into an existing feature without touching the lambda or its online state, 'deploy' is tied to which address receives the publish, and 'change'/'specification' are given intent ('say why with specification and change'). It stops short of covering failure modes or size limits, but the added semantics are real.

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 opening sentence gives a specific verb and scope: 'Save every file, replacing the previous set: as a new version of the lambda, or - with feature - into that feature.' It distinguishes the version path from the feature path and names the sibling it is not ('use change_code' for incremental saves). The core purpose is clear, though it arrives wrapped in a large conceptual essay that dilutes the signal.

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

Usage Guidelines5/5

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

Explicit routing is present: 'To send only what changes, use change_code' and 'To change a lambda that is already in use, work in a feature.' It also states what deploy: true does in-call (publishes to public vs preview address), so the agent knows both when to use this tool and when a sibling is the right call.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.