Skip to main content
Glama

Lokand Restaurant MCP

Theme write files

theme_write_files
Destructive

Change some files of a custom theme (Pro plan) as one new commit: files maps path → whole new text (null deletes), edits are find/replace changes. Read the current files with theme_pull first. Same validation and background compile as theme_upload. On the LIVE theme the change goes live automatically once compiled; theme_rollback undoes it. On the system theme id lokand-base it creates a new unpublished theme from it; pass publish: true to make that live too.

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": {
      "business_id": "<business_id>",
      "theme_id": "<theme_id>"
    },
    "name": "theme_write_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
editsNoFind/replace changes inside existing files. Prefer this over whole files: send only the lines that change
filesNopath → whole new file text, or null to delete the file
messageNoCommit message describing the change
publishNoGo live once compiled (always the case when editing the live theme)
theme_idYesA theme id from theme_list (or the system theme id lokand-base)
business_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / theme_id / description
      Previous value: -"A theme id from theme_list (or a system theme id: lokand-base, lokand-one)"New value: +"A theme id from theme_list (or the system theme id lokand-base)"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/non-idempotent, but the description adds material behavior they cannot express: edits to the LIVE theme go live automatically once compiled, edits to lokand-base fork a new unpublished theme unless publish: true, and the same validation/background compile as theme_upload applies. That is exactly the side-effect detail an agent needs before a write.

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?

Front-loaded with the core action and payload semantics, then prerequisites, then side effects — a sensible ordering with no filler. Some sentences are densely packed with parenthetical clauses ('(Pro plan)', '(null deletes)'), which is efficient but slightly harder to scan.

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 7-parameter nested mutation tool, the description covers plan gating, prerequisites, both payload modes, compile/validation, live effects, and undo. The only real gap is what the call returns (commit identity/compile status), which an agent may want; there is no output schema to cover it.

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?

With schema coverage at 71%, the description still contributes meaning beyond the schema: null semantics for files, the path→whole-text mapping, the edits-as-find/replace framing, the lokand-base special value for theme_id, and the cross-parameter rule that publish is forced on the live theme. It does not add commit-message or length/limit guidance beyond what the schema already carries.

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?

States a specific verb and resource ('Change some files of a custom theme') plus the unit of work ('as one new commit'), and immediately clarifies the two payload shapes (files path→text with null deleting; edits as find/replace). An agent can tell this apart from theme_upload and theme_pull without opening either schema.

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 sequencing ('Read the current files with theme_pull first'), an explicit reversal path ('theme_rollback undoes it'), and per-context behavior for the live theme vs. the system theme id lokand-base. It also states the plan prerequisite (Pro plan) and the publish escape hatch, leaving little to infer.

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.

Resources