# Knap Render — REST API endpoint `knap-render`

Render a Knap template (knap.md, the Markdown template language behind Obsidian Web Clipper and Importer) with a JSON object of variables and return the Markdown. Supports {{ variable | filter:"arg" }} with the 70+ standard filters (bold, h1 to h6, table, list, link, wikilink, callout, yaml_property, date, join, sort, unique, where, replace, upper, kebab and more), {% if %}/{% elseif %}/{% else %}, {% for item in items %} with loop.index, loop.first and loop.last, {% set %}, and {# comments #}. The engine is an AST interpreter with no eval; link and image filters drop javascript: and data: destinations. A syntax error is returned with its line and column. Templates are capped at 200,000 characters and output at 1,000,000.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/knap-render/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/knap-render/
- Same tool on the other surface: https://findutils.com/mcp/knap-render/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/knap-render/execute \
  -H "Content-Type: application/json" \
  -d '{
    "template": "# {{ title | trim }}\n\n{% for tag in tags %}- #{{ tag | kebab }}\n{% endfor %}",
    "variables": {
      "title": "  Reading notes ",
      "tags": [
        "Deep Work",
        "focus"
      ]
    }
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/knap-render
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `template` | string | yes | The Knap template text. |
| `variables` | object | yes | A JSON object mapping variable names to values (strings, numbers, booleans, arrays, nested objects). {{ title }} reads variables.title. |
| `trim_output` | boolean | no | Trim leading and trailing whitespace from the rendered Markdown. Default false. Default: `false`. |

Example arguments (verified):

```json
{
  "template": "# {{ title | trim }}\n\n{% for tag in tags %}- #{{ tag | kebab }}\n{% endfor %}",
  "variables": {
    "title": "  Reading notes ",
    "tags": [
      "Deep Work",
      "focus"
    ]
  }
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:knap_render`. Full MCP reference: https://findutils.com/mcp/knap-render/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
