Skip to main content
Glama

Create LLM chain

create_llm_chain

Set up a prompt-to-response LLM chain in TouchDesigner as a self-contained baseCOMP. Supports OpenAI-compatible endpoints (Ollama, OpenAI, Anthropic) and returns paths for container, prompt, response, and status.

Instructions

Stand up a prompt → response LLM chain inside TouchDesigner as a self-contained baseCOMP. Two modes: webclient — stock chain using webclientDAT + textDATs + headers tableDAT that POSTs JSON to any OpenAI-compatible endpoint (OpenAI, Anthropic, Ollama, llama.cpp, LM Studio, OpenRouter). tox_drop — drops the dotsimulate LLM LOPs .tox and wires mirror DATs. Default provider=ollama (fully offline, no key). API keys are read from env inside TouchDesigner (os.environ) and written into a headers tableDAT — the MCP server never sees them. Returns container_path, prompt_dat_path, response_dat_path, status_chan (:busy), provider, model, endpoint_url, and missing_env when a key is needed but unset. Notes: webclientDAT uses reqmethod/url/includeheader (verified live TD 099); body content goes via body_builder textDAT + callbacks. Anthropic uses x-api-key header + anthropic-version, not Authorization; Ollama requires ollama serve running on 127.0.0.1:11434; dotsimulate TOX par names are UNVERIFIED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNowebclient: stock chain via webclientDAT — no extra dependencies, works with any OpenAI-compatible endpoint. tox_drop: drops the dotsimulate LLM LOPs .tox (requires the TOX installed locally).webclient
parent_pathNoCOMP path to build inside./project1
nameNoInner baseCOMP name. Defaults to llm_<provider> (webclient) or llm_chain (tox_drop).
providerNoLLM provider. ollama default — works fully offline, no API key required. custom requires endpoint_url and model.ollama
endpoint_urlNoOverride the endpoint URL. Required for provider=custom. Defaults: openai → https://api.openai.com/v1/chat/completions, anthropic → https://api.anthropic.com/v1/messages, ollama → http://127.0.0.1:11434/v1/chat/completions.
modelNoModel name. Required for provider=custom. Defaults: openai → gpt-4o-mini, anthropic → claude-sonnet-4-5, ollama → llama3.2.
system_promptNoWritten into a hidden sys textDAT.You are a concise creative assistant for a TouchDesigner live show.
initial_promptNoSeeds the Prompt textDAT on creation.
max_tokensNoMaximum tokens in the response.
temperatureNoSampling temperature [0–2].
json_modeNoSet response_format={type:json_object} for openai/ollama compatible endpoints. Ignored for anthropic.
auto_requestNoIf true, a datExecuteDAT fires webclient.request() whenever the prompt textDAT changes. Default false — caller drives.
tox_pathNoPath to the dotsimulate LLM TOX. Required for mode=tox_drop. Also probes Library/LLM.tox and tox/LLM.tox.
expose_controlsNoSurface Send (Pulse), Model, Temperature, MaxTokens, Active, JsonMode, Provider on the wrapper.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false, destructiveHint=false, openWorldHint=true. Description adds beyond this by detailing behavior: creates a baseCOMP, returns paths, warns about dependencies (Ollama serve, Anthropic headers, TOX unverified), and clarifies API keys are never seen by MCP server. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is a single dense paragraph, front-loaded with purpose. It efficiently covers modes, providers, return values, and caveats. Could benefit from bullet points for readability, but no wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given moderate complexity (14 params, two modes, multiple providers) and no output schema, description explains return values and includes important notes (webclientDAT details, TOX par names unverified). Fairly complete for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (all 14 parameters described). The description does not add extra meaning beyond summarizing modes; it mostly repeats schema info. Baseline 3 is appropriate as schema covers parameter semantics adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool 'stands up a prompt → response LLM chain' as a self-contained baseCOMP in TouchDesigner. It specifies two modes (webclient and tox_drop) and distinguishes itself from siblings that create different components like create_3d_scene or create_audio_reactive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description provides explicit guidance on when to use each mode (webclient for stock chain via webclientDAT, tox_drop for dropping TOX) and default provider (ollama). It also includes provider-specific notes (Anthropic uses x-api-key, Ollama requires ollama serve). However, it does not explicitly state when not to use this tool or suggest alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pantani/tdmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server