Black Friday

Your first month is free. On any plan.

Start on Builder, Pro or Partner and pay $0 for your first month. Cancel anytime. Ends Cyber Monday, November 30.

Claim your free month
MCP tool reference · Group 03 of 9

App files, functions and routes tools

Build the hosted app itself: static files, server-side functions and shared modules, behavior routes, and test requests.

7 toolsOperations & key parametersJSON-RPC examples
In this group

Build the hosted app itself: static files, server-side functions and shared modules, behavior routes, and test requests. Most tools take an operation argument that selects what the call does. Project-scoped tools also take a projectId, and app tools take an optional environment that defaults to prod.

Examples use dev so they don't touch production. The live tool schema from your MCP client is the authoritative parameter list.

At a glance

ToolPurpose
hedy_app_docsRead the hosted-app documentation overview or a single topic.
hedy_app_fileRead, write, patch, list and upload app files served at their browser paths.
hedy_app_handoffHand off a large upload in steps and check its status.
hedy_app_functionsManage server-side functions in JavaScript or Python v1.
hedy_app_modulesManage shared code modules that functions import.
hedy_app_routesSet, list and delete behavior routes: function routes and redirects, with auth, role, rate-limit and CAPTCHA gates.
hedy_app_test_requestSend a test request to the app and read the response, the winning route and shadowed routes. Requires Editor.

hedy_app_docs

Read the hosted-app documentation overview or a single topic.

Operations

No arguments for the overview and topic index; topic for one topic

Key parameters
ParameterWhat it doesExample
topicOne documentation topic, such as files. Omit it for the overview and topic index."files"
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_docs",
    "arguments": {
      "topic": "files"
    }
  }
}

hedy_app_file

Read, write, patch, list and upload app files served at their browser paths.

Operations
  • read
  • patch
  • put-small
  • put-url
  • create-upload
  • complete-upload
  • list
  • get-url
  • delete
Key parameters
ParameterWhat it doesExample
operationSelects what the call does. Use one of the operations listed above."put-small"
projectIdThe project to act on, for example proj_…. List yours with hedy_project (operation: "list")."proj_..."
environmentThe hosted-app environment. Defaults to prod, so pass dev or another environment when you don't mean production."dev"
pathThe browser path the file is served at, for example /index.html."/index.html"
contentThe file body for put-small."<!doctype html><h1>Hello</h1>"
contentTypeThe MIME type, for example text/html."text/html"
ifMatchSha256Write guard: the file's current SHA-256, or "none" for a new path. A mismatch returns a conflict instead of overwriting."none"
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_file",
    "arguments": {
      "operation": "put-small",
      "projectId": "proj_...",
      "environment": "dev",
      "path": "/index.html",
      "contentType": "text/html",
      "content": "<!doctype html><h1>Hello</h1>",
      "ifMatchSha256": "none"
    }
  }
}

hedy_app_handoff

Hand off a large upload in steps and check its status.

Operations
  • create-upload
  • complete-upload
  • status
Key parameters
ParameterWhat it doesExample
operationSelects what the call does. Use one of the operations listed above."status"
projectIdThe project to act on, for example proj_…. List yours with hedy_project (operation: "list")."proj_..."
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_handoff",
    "arguments": {
      "operation": "status",
      "projectId": "proj_..."
    }
  }
}

hedy_app_functions

Manage server-side functions in JavaScript or Python v1.

Operations
  • put
  • put-url
  • head
  • patch
  • get
  • get-url
  • list
  • delete

Runtime: js or python.

Key parameters
ParameterWhat it doesExample
operationSelects what the call does. Use one of the operations listed above."put"
projectIdThe project to act on, for example proj_…. List yours with hedy_project (operation: "list")."proj_..."
environmentThe hosted-app environment. Defaults to prod, so pass dev or another environment when you don't mean production."dev"
nameThe function name. Function routes refer to it as their target."list-todos"
codeThe function source."async function handler(ctx){ co…"
runtimejs (the default) or python.—
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_functions",
    "arguments": {
      "operation": "put",
      "projectId": "proj_...",
      "environment": "dev",
      "name": "list-todos",
      "code": "async function handler(ctx){ const r = await ctx.data.list('todos',{limit:50}); return { status:200, body:r }; }"
    }
  }
}

hedy_app_modules

Manage shared code modules that functions import.

Operations
  • put
  • put-url
  • head
  • get
  • get-url
  • list
  • patch
  • delete
Key parameters
ParameterWhat it doesExample
operationSelects what the call does. Use one of the operations listed above."list"
projectIdThe project to act on, for example proj_…. List yours with hedy_project (operation: "list")."proj_..."
environmentThe hosted-app environment. Defaults to prod, so pass dev or another environment when you don't mean production."dev"
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_modules",
    "arguments": {
      "operation": "list",
      "projectId": "proj_...",
      "environment": "dev"
    }
  }
}

hedy_app_routes

Set, list and delete behavior routes: function routes and redirects, with auth, role, rate-limit and CAPTCHA gates.

Operations
  • set
  • list
  • delete

Kind: function or redirect; timeoutSeconds 1-30; rateLimitPerMinute 1-6000; requireCaptcha.

Key parameters
ParameterWhat it doesExample
operationSelects what the call does. Use one of the operations listed above."set"
projectIdThe project to act on, for example proj_…. List yours with hedy_project (operation: "list")."proj_..."
environmentThe hosted-app environment. Defaults to prod, so pass dev or another environment when you don't mean production."dev"
methodThe HTTP method, for example GET."GET"
pathThe route path. Accepts :name or {name} segments and a trailing whole-segment *."/api/todos"
kindfunction or redirect."function"
targetThe function the route runs, or where a redirect points."list-todos"
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_routes",
    "arguments": {
      "operation": "set",
      "projectId": "proj_...",
      "environment": "dev",
      "method": "GET",
      "path": "/api/todos",
      "kind": "function",
      "target": "list-todos"
    }
  }
}

hedy_app_test_request

Send a test request to the app and read the response, the winning route and shadowed routes. Requires Editor.

Operations

Single request (path, method, body, headers, asAppUserId or asAppKeyId, environment)

Key parameters
ParameterWhat it doesExample
projectIdThe project to act on, for example proj_…. List yours with hedy_project (operation: "list")."proj_..."
pathThe path to request."/api/todos"
methodThe HTTP method to use.—
environmentThe hosted-app environment. Defaults to prod, so pass dev or another environment when you don't mean production."dev"
Example call
JSON-RPC tools/call
{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "hedy_app_test_request",
    "arguments": {
      "projectId": "proj_...",
      "environment": "dev",
      "path": "/api/todos"
    }
  }
}
Build with Hedy Assist

Connect it once.
Build and run from the AI you already use.

Add the Hedy Assist MCP server to Claude, ChatGPT, Cursor or Claude Code, then create a project, build the hosted app and ship it, all in one conversation.

For AI agents: a plain-text index of these docs is at /llms.txt.