Critical Risk →

manage_function

Manage function lifecycle: list, get source, delete, get logs, and update environment variables. Actions: - "list": List all deployed functions with status, metrics, and invocation URLs - "get": Retrieve a single function's full detail including its deployed source code - "delete": Delete a deplo...

How to control manage_function ↓

What manage_function does on Mcp

AI agents call manage_function to permanently remove resources in Mcp — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

ParameterTypeRequiredDescription
env object Environment variables to set (string) or delete (null)
level string Filter by log level (default: all)
limit number Maximum number of logs to return (default: 100)
since string ISO timestamp to filter logs after this time
action string Yes The action to perform
app_id string Yes The app ID
function_name string The function name (required for get, delete, get_logs, update_env)
include_deleted boolean Include logs for soft-deleted functions (post-incident forensics). Default: false.

Parameters from the server's own tool schema.

Critical Risk

Why manage_function needs a policy

Although this tool bundles multiple actions (list, get, delete, get_logs, update_env), the presence of the irreversible "delete" action that permanently removes deployed functions classifies it as Destructive. This is the most severe capability offered. An AI agent with access to this tool could accidentally or maliciously delete critical backend functions, causing significant service disruption.

From the tool's definition The tool includes a "delete" action that "Delete a deployed function permanently (IRREVERSIBLE)". This is explicitly stated as irreversible, making it a destructive operation.

Documented attack patterns abuse exactly the kind of access manage_function gives an agent:

How to control manage_function

PolicyLayer is an MCP gateway — it sits between your AI agents and Mcp, and nothing reaches the server without passing your rules. This is the rule we recommend for manage_function:

policy.json
{
  "version": "1",
  "default": "deny",
  "hide": [
    "manage_function"
  ]
}

manage_function disappears from the agent's tool list entirely, and any attempt to call it is denied. The rest of the server keeps working.

  1. Create a free account and register Mcp — nothing to install.
  2. Add this policy — paste it, or build it visually.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
RESTRICT THIS TOOL →

Free to start. No card required.

Related tools and policies

Go deeper

Questions about manage_function

What does the manage_function tool do? +

Manage function lifecycle: list, get source, delete, get logs, and update environment variables. Actions: - "list": List all deployed functions with status, metrics, and invocation URLs - "get": Retrieve a single function's full detail including its deployed source code - "delete": Delete a deployed function permanently (IRREVERSIBLE) - "get_logs": Retrieve recent invocation logs for debugging and monitoring - "update_env": Update environment variables for a deployed function without redeploying code Parameters by action: list: { app_id, action: "list" } get: { app_id, action: "get", function_name } delete: { app_id, action: "delete", function_name } get_logs: { app_id, action: "get_logs", function_name, limit?, since?, level?, include_deleted? } update_env: { app_id, action: "update_env", function_name, env } Common errors: - RESOURCE_NOT_FOUND: Function doesn't exist - VALIDATION_INVALID_SCHEMA: Invalid parameter format Idempotency: Safe to call anytime (list is read-only; delete is idempotent; update_env is safe to call multiple times). It is categorised as a Destructive tool in the Mcp MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.

What parameters does manage_function accept? +

manage_function accepts 8 parameters: env, level, limit, since, action, app_id, function_name, include_deleted. Required: action, app_id. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on manage_function? +

Register the MCP server in PolicyLayer and add a rule for manage_function: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp. Nothing to install.

What risk level is manage_function? +

manage_function is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit manage_function? +

Yes. Add a rate_limit block to the manage_function rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block manage_function completely? +

Set action: deny in the PolicyLayer policy for manage_function. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides manage_function? +

manage_function is provided by the MCP server (@butterbase/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Mcp tool call.

Start from Mcp, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.

Free to start. No card required.

43 Mcp tools catalogued and risk-classified — across an index of 43,000+ MCP servers.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.