Tool registry

Publish your functions as discoverable tools that other users and AI agents can find and use. The tool registry is a public catalog of MCP-compatible endpoints.

Browse the registry

Search for published tools without authentication:

curl "https://api.fold.run/registry?q=weather&limit=10"
Parameter Type Default Description
q string Search by name or description
category string Filter by category
tag string Filter by tag
page number 1 Page number
limit number 50 Results per page (max 200)

Response:

{
  "tools": [
    {
      "id": "tool_abc",
      "tool_name": "weather-lookup",
      "description": "Get current weather for any city",
      "category": "utilities",
      "tags": ["weather", "api"],
      "url": "https://acme.fold.run/weather-lookup",
      "mcp_endpoint": "https://acme.fold.run/.well-known/mcp",
      "installs": 42,
      "published_at": "2026-03-10T12:00:00.000Z"
    }
  ],
  "has_more": false
}

Get tool details

curl "https://api.fold.run/registry/tool_abc"

Returns the full tool entry including input_schema (JSON Schema describing accepted parameters).

Publish a tool

Deploy a function with tool metadata, then publish it to the registry:

curl -X POST https://api.fold.run/registry \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "function_id": "fn_xyz",
    "visibility": "public"
  }'

The function must have tool metadata registered during deployment. The registry entry is created from the function's existing metadata (name, description, input schema).

Field Type Required Description
function_id string Yes Function to publish
visibility string No public (default) or private

Publishing the same function again updates the existing registry entry.

Unpublish a tool

curl -X DELETE "https://api.fold.run/registry/tool_abc" \
  -H "Authorization: Bearer YOUR_TOKEN"

Unpublishing removes the tool from search results. The function itself is not affected.

Managing tool metadata

List your organization's registered tools:

curl "https://api.fold.run/tools" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get metadata for a specific function:

curl "https://api.fold.run/tools/fn_xyz" \
  -H "Authorization: Bearer YOUR_TOKEN"

Remove tool metadata (keeps the function deployed):

curl -X DELETE "https://api.fold.run/tools/fn_xyz" \
  -H "Authorization: Bearer YOUR_TOKEN"

Using published tools

Each published tool exposes two URLs:

URL Purpose
url Direct HTTP endpoint for the function
mcp_endpoint MCP protocol endpoint for AI agents

AI agents can connect to the mcp_endpoint using any MCP client to discover and invoke the tool with structured input/output.

Tool recommendations

Find the right tool for a task using natural language. Returns ranked results based on semantic similarity to tool descriptions.

curl -X POST https://api.fold.run/tools/recommend \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "query": "fetch web page content", "limit": 5 }'

Response:

{
  "query": "fetch web page content",
  "recommendations": [
    { "tool_name": "web-scraper", "description": "Fetch a URL and extract clean text content", "function_id": "fn_abc", "score": 0.92 },
    { "tool_name": "pdf-reader", "description": "Extract text from a PDF URL", "function_id": "fn_def", "score": 0.74 }
  ]
}

When Vectorize and AI bindings are available, recommendations use semantic vector search. Otherwise, they fall back to keyword matching against tool names and descriptions.

Deploying with tool metadata

To make a function publishable, include tool metadata in the deploy request:

curl -X POST https://api.fold.run/deploy \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "weather-lookup",
    "code": "export default { async fetch(req) { ... } }",
    "tool_metadata": {
      "tool_name": "weather-lookup",
      "description": "Get current weather for any city",
      "input_schema": {
        "type": "object",
        "properties": {
          "city": { "type": "string", "description": "City name" }
        },
        "required": ["city"]
      },
      "category": "utilities",
      "tags": ["weather", "api"]
    }
  }'