Skip to main content
Glama
vuluu2k

WebCake Storefront MCP

by vuluu2k

edit_http_function

Edit a single HTTP function by name in a code file. Fix bugs, rename, add, or remove one function; use full-content update for larger refactors.

Instructions

Edit the HTTP function file by function name — best for targeted changes (fix a bug, rename, add one function). For writing multiple new functions or major refactors, use update_http_function with full content instead. Actions:

  • "replace_function": replace an ENTIRE function by name with new code. Server finds function boundaries automatically.

  • "add": append new function code at end of file.

  • "remove": remove a function by name.

  • "update_imports": replace the import block (lines before first export). Returns updated function list after edit.

Input Schema

NameRequiredDescriptionDefault
codeNoNew function code (for replace_function and add) or new import block (for update_imports)
actionYesEdit action
function_nameNoTarget function name (for replace_function and remove)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.31.8

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, confirming mutation. The description adds real behavior beyond that: replace_function replaces the entire function and the server finds boundaries automatically, add appends at end of file, remove deletes a function, update_imports targets lines before the first export, and the return value is the updated function list. It does not mention whether edits are reversible or versioned, which is a minor gap for a destructive tool.

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 purpose and the sibling comparison before the action breakdown. The bulleted action list is scannable and each line earns its place, though the total length is on the longer side.

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?

With no output schema, the description correctly states the return value (updated function list). It covers all four actions, param pairing, and the sibling alternative. Safety/undo semantics for the destructive remove/replace paths are the only notable omission.

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%, so the schema already documents action, code, and function_name. The description restates the param-to-action pairing in prose but adds little syntax or constraint detail beyond what the schema provides, so baseline 3 applies.

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 (edit), resource (HTTP function file), and scope (by function name), then immediately distinguishes itself from update_http_function. An agent can route between the two 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?

Explicitly names when to use this tool (targeted changes: fix a bug, rename, add one function) and the alternative for the opposite case (multiple new functions or refactors → update_http_function with full content). The action list further clarifies per-mode usage.

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

Deploy Server

Other Tools