> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List agent templates

> List public agent templates and installable catalog entries

export const McpToolCall = ({tool, initialArguments = {}}) => {
  const endpoint = "https://api.veryfront.com/mcp";
  const tokenStorageKey = 'veryfront.docs.mcpBearerToken';
  const escapeHtml = value => value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  const highlightJson = value => {
    const escaped = escapeHtml(value);
    return escaped.replace(/("(?:\\u[a-fA-F0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+\-]?\d+)?)/g, match => {
      let color = '#f3f4f6';
      if (match.endsWith(':')) {
        color = '#7dd3fc';
      } else if (match.startsWith('"')) {
        color = '#86efac';
      } else if ((/true|false/).test(match)) {
        color = '#c4b5fd';
      } else if ((/null/).test(match)) {
        color = '#fcd34d';
      } else {
        color = '#67e8f9';
      }
      return `<span style="color: ${color}">${match}</span>`;
    });
  };
  const expandJsonStrings = value => {
    if (typeof value === 'string') {
      const trimmed = value.trim();
      if (trimmed.startsWith('{') && trimmed.endsWith('}') || trimmed.startsWith('[') && trimmed.endsWith(']')) {
        try {
          return expandJsonStrings(JSON.parse(trimmed));
        } catch {}
      }
      return value;
    }
    if (Array.isArray(value)) {
      return value.map(expandJsonStrings);
    }
    if (value && typeof value === 'object') {
      return Object.fromEntries(Object.entries(value).map(([key, nestedValue]) => [key, expandJsonStrings(nestedValue)]));
    }
    return value;
  };
  const formatJson = value => {
    try {
      return JSON.stringify(expandJsonStrings(value), null, 2);
    } catch {
      return String(value);
    }
  };
  const formatResponseText = text => {
    const trimmed = text.trim();
    if (!trimmed) return 'No response body.';
    try {
      return formatJson(JSON.parse(trimmed));
    } catch {}
    const ssePayloads = trimmed.split(/\n\n+/).flatMap(chunk => chunk.split('\n').filter(line => line.startsWith('data:')).map(line => line.slice(5).trim()).filter(Boolean));
    for (let index = ssePayloads.length - 1; index >= 0; index -= 1) {
      try {
        return formatJson(JSON.parse(ssePayloads[index]));
      } catch {}
    }
    return trimmed;
  };
  const readStoredToken = () => {
    if (typeof window === 'undefined') return '';
    try {
      return window.sessionStorage.getItem(tokenStorageKey) || '';
    } catch {
      return '';
    }
  };
  const writeStoredToken = value => {
    if (typeof window === 'undefined') return;
    try {
      if (value) {
        window.sessionStorage.setItem(tokenStorageKey, value);
      } else {
        window.sessionStorage.removeItem(tokenStorageKey);
      }
    } catch {}
  };
  const [token, setToken] = useState(readStoredToken);
  const [argumentText, setArgumentText] = useState(formatJson(initialArguments));
  const [status, setStatus] = useState('Ready');
  const [response, setResponse] = useState('No response yet.');
  const [copied, setCopied] = useState(false);
  const callTool = async () => {
    if (!token.trim()) {
      setStatus('Paste a bearer token first.');
      return;
    }
    let parsedArguments;
    try {
      parsedArguments = argumentText.trim() ? JSON.parse(argumentText) : {};
    } catch {
      setStatus('Input must be valid JSON.');
      return;
    }
    const body = {
      jsonrpc: '2.0',
      id: Date.now(),
      method: 'tools/call',
      params: {
        name: tool,
        arguments: parsedArguments
      }
    };
    setStatus('Calling tool...');
    setResponse(formatJson(body));
    try {
      const result = await fetch(endpoint, {
        method: 'POST',
        headers: {
          accept: 'application/json, text/event-stream',
          'content-type': 'application/json',
          authorization: `Bearer ${token.trim()}`,
          'x-veryfront-origin': 'docs-mcp-tool-page'
        },
        body: JSON.stringify(body)
      });
      const text = await result.text();
      setStatus(result.ok ? 'Response received.' : `Request failed with HTTP ${result.status}.`);
      setResponse(formatResponseText(text));
    } catch (error) {
      setStatus('Request failed.');
      setResponse(error instanceof Error ? error.message : String(error));
    }
  };
  const copyResponse = async () => {
    try {
      await navigator.clipboard.writeText(response);
      setCopied(true);
      setTimeout(() => setCopied(false), 1500);
    } catch {
      setStatus('Copy failed.');
    }
  };
  return <div className="not-prose my-6 rounded-xl border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-950">
      <div className="mb-4">
        <div className="text-sm font-semibold text-gray-900 dark:text-gray-100">MCP tool call</div>
        <div className="mt-1 text-sm text-gray-600 dark:text-gray-400">
          Call <code>{tool}</code> against the Veryfront MCP endpoint.
        </div>
      </div>

      <label className="mb-2 block text-sm font-medium text-gray-900 dark:text-gray-100" htmlFor={`${tool}-token`}>
        Bearer token
      </label>
      <input id={`${tool}-token`} className="mb-4 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100" type="password" value={token} onChange={event => {
    const value = event.target.value;
    setToken(value);
    writeStoredToken(value);
  }} placeholder="Paste API key or JWT" />

      <label className="mb-2 block text-sm font-medium text-gray-900 dark:text-gray-100" htmlFor={`${tool}-arguments`}>
        Input JSON
      </label>
      <textarea id={`${tool}-arguments`} className="mb-4 min-h-40 w-full rounded-md border border-gray-300 bg-white px-3 py-2 font-mono text-sm text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100" value={argumentText} onChange={event => setArgumentText(event.target.value)} spellCheck={false} />

      <button className="rounded-md bg-gray-900 px-3 py-2 text-sm font-medium text-white hover:bg-gray-700 dark:bg-gray-100 dark:text-gray-950 dark:hover:bg-gray-300" type="button" onClick={callTool}>
        Call tool
      </button>

      <div className="mt-4 text-sm font-medium text-gray-900 dark:text-gray-100">{status}</div>
      <div className="mt-3 overflow-hidden rounded-md border border-gray-300 dark:border-gray-700">
        <div className="flex items-center justify-between bg-gray-100 px-3 py-2 text-sm font-medium text-gray-900 dark:bg-gray-900 dark:text-gray-100">
          <span>Output JSON</span>
          <button className="rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-950 dark:text-gray-100 dark:hover:bg-gray-800" type="button" onClick={copyResponse}>
            {copied ? 'Copied' : 'Copy'}
          </button>
        </div>
      <pre className="max-h-96 overflow-auto whitespace-pre-wrap break-words bg-gray-950 p-4 text-sm text-gray-100">
        <code dangerouslySetInnerHTML={{
    __html: highlightJson(response)
  }} />
      </pre>
      </div>
    </div>;
};

List public agent templates and installable catalog entries

## Tool details

| Field | Value                  |
| ----- | ---------------------- |
| Name  | `list_agent_templates` |
| Group | Agents                 |

## Playground

<McpToolCall tool="list_agent_templates" initialArguments={{}} />

## Input schema

```json title="input-schema.json" theme={null}
{
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "description": "Opaque pagination cursor returned by a previous response."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "Maximum number of results to return."
    },
    "search": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Provide the search."
    },
    "category": {
      "type": "string",
      "minLength": 1,
      "description": "Provide the category."
    },
    "kind": {
      "type": "string",
      "enum": [
        "template_agent",
        "installable_agent"
      ],
      "description": "Provide the kind."
    },
    "origin": {
      "type": "string",
      "enum": [
        "veryfront",
        "user"
      ],
      "description": "Provide the origin."
    },
    "sort_by": {
      "type": "string",
      "enum": [
        "name",
        "agent_id",
        "category_label"
      ],
      "description": "Provide the sort by."
    },
    "sort_order": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ],
      "description": "Provide the sort order."
    }
  },
  "additionalProperties": false,
  "description": "Input schema for the list_agent_templates tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```

## Output schema

```json title="output-schema.json" theme={null}
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the record."
          },
          "agent_id": {
            "type": "string",
            "description": "The agent id associated with this record."
          },
          "kind": {
            "type": "string",
            "enum": [
              "template_agent",
              "installable_agent"
            ],
            "description": "The kind associated with this record."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name for the record."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description for the record."
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The avatar url associated with this record."
              },
              {
                "type": "null",
                "description": "The avatar url returned by the tool."
              }
            ],
            "description": "The avatar url associated with this record."
          },
          "category_id": {
            "type": "string",
            "description": "The category id associated with this record."
          },
          "category_label": {
            "type": "string",
            "description": "The category label associated with this record."
          },
          "provider_name": {
            "type": "string",
            "description": "The provider name associated with this record."
          },
          "provider_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri",
                "description": "The provider url associated with this record."
              },
              {
                "type": "null",
                "description": "The provider url returned by the tool."
              }
            ],
            "description": "The provider url associated with this record."
          },
          "model": {
            "type": [
              "string",
              "null"
            ],
            "description": "AI model id or alias. Call list_models for the ids this deployment serves; never invent a version suffix."
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The version associated with this record."
          },
          "tools": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "One tool item associated with this record."
                },
                "description": "List of tools associated with this record."
              },
              {
                "type": "null",
                "description": "The tools returned by the tool."
              }
            ],
            "description": "The tools associated with this record."
          },
          "suggestions": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "description": "The option 1 associated with this record."
                    },
                    {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "description": "Short human-readable title for the record."
                        },
                        "prompt": {
                          "type": "string",
                          "minLength": 1,
                          "description": "The prompt associated with this record."
                        }
                      },
                      "required": [
                        "title",
                        "prompt"
                      ],
                      "additionalProperties": false,
                      "description": "Structured option 2 details associated with this record."
                    }
                  ],
                  "description": "One suggestion item associated with this record."
                },
                "description": "List of suggestions associated with this record."
              },
              {
                "type": "null",
                "description": "The suggestions returned by the tool."
              }
            ],
            "description": "List of suggestions associated with this record."
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "fork",
                "install"
              ],
              "description": "One action item associated with this record."
            },
            "description": "List of actions associated with this record."
          },
          "template_project": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "project_reference": {
                    "type": "string",
                    "description": "Project identifier or slug associated with the record."
                  },
                  "name": {
                    "type": "string",
                    "description": "Human-readable name for the record."
                  },
                  "source_path": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The source path associated with this record."
                  }
                },
                "required": [
                  "project_reference",
                  "name",
                  "source_path"
                ],
                "additionalProperties": false,
                "description": "Structured template project details associated with this record."
              },
              {
                "type": "null",
                "description": "The template project returned by the tool."
              }
            ],
            "description": "The template project associated with this record."
          },
          "installability": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "installable",
                      "already_installed",
                      "unavailable"
                    ],
                    "description": "Lifecycle status for the record."
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The reason associated with this record."
                  }
                },
                "required": [
                  "status",
                  "reason"
                ],
                "additionalProperties": false,
                "description": "Structured installability details associated with this record."
              },
              {
                "type": "null",
                "description": "The installability returned by the tool."
              }
            ],
            "description": "The installability associated with this record."
          },
          "origin": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "veryfront",
                  "user"
                ],
                "description": "The origin associated with this record."
              },
              {
                "type": "null",
                "description": "The origin returned by the tool."
              }
            ],
            "description": "The origin associated with this record."
          },
          "runtime_mode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "push_service",
                  "pull_worker",
                  "none"
                ],
                "description": "The runtime mode associated with this record."
              },
              {
                "type": "null",
                "description": "The runtime mode returned by the tool."
              }
            ],
            "description": "The runtime mode associated with this record."
          },
          "runtime_service_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "The runtime service key associated with this record."
          },
          "environment_scope": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "development",
                  "staging",
                  "production",
                  "all"
                ],
                "description": "The environment scope associated with this record."
              },
              {
                "type": "null",
                "description": "The environment scope returned by the tool."
              }
            ],
            "description": "The environment scope associated with this record."
          },
          "card": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "description": "Additional structured values associated with this result."
                },
                "description": "Structured card details associated with this record."
              },
              {
                "type": "null",
                "description": "The card returned by the tool."
              }
            ],
            "description": "The card associated with this record."
          }
        },
        "required": [
          "id",
          "agent_id",
          "kind",
          "name",
          "description",
          "avatar_url",
          "category_id",
          "category_label",
          "provider_name",
          "provider_url",
          "model",
          "version",
          "tools",
          "suggestions",
          "actions",
          "template_project",
          "installability",
          "origin",
          "runtime_mode",
          "runtime_service_key",
          "environment_scope",
          "card"
        ],
        "additionalProperties": false,
        "description": "Structured agent template output schema for MCP tools."
      },
      "description": "Primary record collection."
    },
    "total": {
      "type": "integer",
      "description": "The total associated with this record."
    },
    "page_info": {
      "type": "object",
      "properties": {
        "self": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor that refers to the current page."
        },
        "first": {
          "type": "object",
          "description": "The first associated with this record."
        },
        "next": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor for the next page."
        },
        "prev": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cursor for the previous page."
        }
      },
      "required": [
        "self",
        "first",
        "next",
        "prev"
      ],
      "additionalProperties": false,
      "description": "Pagination cursor values for traversing the result set."
    }
  },
  "required": [
    "data",
    "total",
    "page_info"
  ],
  "additionalProperties": false,
  "description": "Structured list agent templates output schema for MCP tools.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```
