Theia AI MCP oauth block and ~{mcp_} tool syntax with Sume tools

Theia AI can sign in to a remote MCP server with an oauth block and call its tools as ~{mcp_server_tool}. Here is how that maps to Sume's jobs_wait and gates.

5 min readSume
All posts

The answer

Theia AI's documentation lets a remote MCP entry carry an oauth block (enabled, plus optional clientId, scopes, authorizationServer and resource), after which starting the server opens your system browser to sign in. Theia says it acts as a public client using PKCE and registers dynamically with the authorization server when no static client id is set.

Once the server is running, its functions are referenced in prompts as ~{mcp_<server-name>_<function-name>}. With an entry named sume, the tool that waits on jobs is ~{mcp_sume_jobs_wait}.

The entry and the scopes

Sume's OAuth flow follows protected-resource metadata, uses PKCE for the code exchange, and supports two scopes: mcp:read (required) and mcp:write (opt-in on the consent screen). There is no paid scope; spending is gated by the wallet and admission.

{
  "sume": {
    "serverUrl": "https://mcp.sume.com/mcp",
    "oauth": { "enabled": true }
  }
}

Naming tools in a prompt

The prefix is mcp, then the entry name, then the function name. Reading tools such as tools_list and jobs_status are visible under mcp:read; submitting tools appear only when the session has mcp:write or an API key.

Theia tool references for common Sume MCP tools (read 2026-10-03)
Sume toolTheia referenceNeeds
jobs_status~{mcp_sume_jobs_status}mcp:read
jobs_wait~{mcp_sume_jobs_wait}mcp:read
jobs_result~{mcp_sume_jobs_result}mcp:read
generate_image~{mcp_sume_generate_image}mcp:write and idempotency_key

Prompt wording that respects the gates

A prompt that submits paid work should tell the agent to supply a stable idempotency_key and to wait with repeated jobs_wait calls on the same job ids instead of resubmitting. Sume's docs say a wait_slice_expired answer means retry the wait, never the create.

When you start the server, Theia shows a notification confirming the functions it made available, which is a quick way to check the scope you were granted: if the submitting tools are missing, the session is read-only.

A caution on this table

The tool names in the table come from Sume's gates and jobs docs and Theia's reference syntax. Theia's page describes the syntax with another server's function, so confirm the exact names your session lists before pinning them in a shared prompt.

Handling a long render

A video job does not finish inside one wait. The remote wait defaults to 50 seconds and is capped at 55, because an HTTP request held longer is closed by the edge and the caller gets no tool result while the job keeps billing. A prompt for a long job should therefore say: submit once, then call the wait tool again with the same job ids until the status is terminal.

Sume's batch form takes 1 to 20 ids in job_ids with wait_for set to all or any, so a prompt that fans out several renders can wait on all of them in one call per slice. With include_results true, finished jobs come back with their results in the same answer.

If the answer says wait_slice_expired, that is a slice ending, not a failure. A 524 or similar on the wait is a transport failure, never a job outcome; re-issue the wait or read status once.

Removing the server

Theia's page says that when you remove a server from the MCP preference, the IDE stops it cleanly and unregisters its tools, so prompts that referenced them stop showing stale entries. If you switch from an API key entry to the OAuth entry, remove the old one first so two sume entries do not compete for the same tool names.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume