llms.txt Content
# Glif - getting started
Glif's MCP/API surface is project-first. Calling agents should treat Glif as a server-side media agent, not as a model picker or a raw native-tool registry.
Two nouns, one id each: a **project** (`project_id`) is the durable container — history, assets, model — that you continue across calls; a **job** (`job_id`) is one run of Glif's agent, i.e. one `compose_project` call. The same `job_id` is the `get_job_status` poll handle and the `jobId` in results.
## Endpoint
~~~
https://glif.app/api/mcp
~~~
One endpoint, one fixed tool set for every authenticated client. JSON-RPC 2.0 over Streamable HTTP.
## Tools
- `compose_project` - create or continue a durable Glif project from natural language. Glif chooses models, native tools, and multi-step workflows internally. Pass `project_id` to continue; omit it to start a new project. Returns immediately with a `jobId` (see Async jobs).
- `get_job_status` - poll a job started by `compose_project`. Returns `working` while the job runs; the completed response carries the full result including generated media. This is a data-only polling tool and does not mount the media viewer.
- `get_project` - inspect project status, active job, latest message, recent messages, and generated media (assets are included here).
- `view_media` - render completed or already-generated media in the interactive viewer (e.g. after a job completes, or "show me that image again"). It applies once after completion, not to `working` polls, and avoids the CSP issues pasted media URLs can hit; it does not generate anything.
- `list_projects` - list recent projects owned by the authenticated user.
- `list_user_skills` / `get_user_skill` - read the authenticated user's personal Glif skills only. Global Glif skills are not exposed as public MCP tools.
- `upload_file` - upload image, video, or audio and pass the returned media URL into `compose_project` as an attachment/reference.
- `whoami` - returns identity, API key label, pl
OpenAPI Spec (preview)
{
"openapi": "3.1.0",
"info": {
"title": "Glif MCP API",
"version": "1.0.0",
"description": "Glif's media-generation agent over the Model Context Protocol (MCP).\n\nThe single endpoint `POST /api/mcp` speaks JSON-RPC 2.0 over Streamable\nHTTP (stateless; responses may stream as SSE). Authenticate with a\nbearer token — either a `glif_v1_…` API key or an MCP OAuth access token.\n\nStandard MCP methods are supported: `initialize`, `tools/list`, and\n`tools/call`. Long-running g