Skip to main content
Glama
vuluu2k

WebCake Storefront MCP

by vuluu2k

edit_http_function

Edit HTTP function files by function name to fix bugs, rename, or add code. Supports replace, add, remove, and import updates, returning updated function list.

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

TableJSON 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)
Behavior4/5

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

With no annotations, the description carries the disclosure burden. It reveals useful behavior: server finds function boundaries automatically, replacement is whole-function, appending goes to end of file, and update_imports affects lines before first export. It also discloses the return value. However, it doesn't explicitly warn about the destructive nature of replace/remove or error handling.

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

Conciseness5/5

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

The description is well-structured: a leading sentence for purpose, a clear alternative, a bulleted action list, and a return note. Every sentence adds information; no tautology or padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking annotations and output schema, the description fully covers the tool's actions, parameter usage, and return value. It also provides usage boundaries versus update_http_function. No significant gaps are apparent for this complexity level.

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 baseline is 3. The description adds value by mapping each action to which parameters are meaningful and how they're used (e.g., replace entire function vs append; import block vs code). It clarifies the relationship between action, code, and function_name beyond the schema's short descriptions.

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 uses a specific verb ('Edit') with a clear resource ('HTTP function file') and scope ('by function name'). It lists four concrete actions and explicitly contrasts with update_http_function, making the tool's purpose unambiguous.

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?

It explicitly states when to use this tool ('best for targeted changes...') and when to use an alternative ('For writing multiple new functions or major refactors, use update_http_function with full content instead'). This is a clear when/when-not statement naming the alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vuluu2k/webcake-storefront-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server