Skip to main content
Glama

Create LLM chain

create_llm_chain

Stand up a prompt-to-response LLM chain in TouchDesigner as a baseCOMP, using webclient or TOX drop, for OpenAI, Anthropic, Ollama, or custom endpoints. Returns DAT paths and a busy status channel.

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
nameNoInner baseCOMP name. Defaults to llm_<provider> (webclient) or llm_chain (tox_drop).
modelNoModel name. Required for provider=custom. Defaults: openai → gpt-4o-mini, anthropic → claude-sonnet-4-5, ollama → llama3.2.
providerNoLLM provider. ollama default — works fully offline, no API key required. custom requires endpoint_url and model.ollama
tox_pathNoPath to the dotsimulate LLM TOX. Required for mode=tox_drop. Also probes Library/LLM.tox and tox/LLM.tox.
json_modeNoSet response_format={type:json_object} for openai/ollama compatible endpoints. Ignored for anthropic.
max_tokensNoMaximum tokens in the response.
parent_pathNoCOMP path to build inside./project1
temperatureNoSampling temperature [0–2].
auto_requestNoIf true, a datExecuteDAT fires webclient.request() whenever the prompt textDAT changes. Default false — caller drives.
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.
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.
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?

The description goes far beyond annotations by disclosing side effects (creates baseCOMP, writes API keys into headers tableDAT), network behavior (POSTs JSON to endpoints), security properties ('MCP server never sees them'), and prerequisites. It even includes verification status ('verified live TD 099') and explicitly flags unverified aspects ('dotsimulate TOX par names are UNVERIFIED'). This is exemplary transparency.

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

Conciseness5/5

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

The description is appropriately lengthy for a 14-parameter tool but every sentence serves a purpose: mode explanation, defaults, security, return values, and technical caveats. It is front-loaded with the main action and then logically organized. No filler or redundancy.

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

Completeness5/5

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

Given the tool's complexity, no output schema, and rich annotations, the description is remarkably complete. It lists return values (container_path, prompt_dat_path, response_dat_path, status_chan, etc.), explains both modes, covers provider-specific behaviors, and flags unverified parts. The agent has enough context to invoke the tool correctly and set expectations.

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 coverage is 100%, so baseline is 3. The description adds some context not in the schema, such as the offline nature of the default provider and that custom provider requires endpoint_url and model, but these are also partially in the schema descriptions. It adds implementation details like 'webclientDAT uses reqmethod/url/includeheader' but those are not parameter semantics. The added value over the schema is marginal, so a 3 is warranted.

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?

The description clearly states the tool's purpose: 'Stand up a prompt → response LLM chain inside TouchDesigner as a self-contained baseCOMP.' It distinguishes two modes (webclient and tox_drop) with specific implementation details, making it unique from siblings like create_voice_prompt_pipeline or connect_huggingface_inference_bridge. The verb 'stand up' is specific and the resource (LLM chain) is well-defined.

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?

The description provides clear when-to-use guidance by outlining two modes with their prerequisites: webclient for any OpenAI-compatible endpoint, tox_drop requiring the dotsimulate TOX installed locally. It also notes the default provider (ollama) is fully offline with no key, and mentions requirements like 'Ollama requires ollama serve running on 127.0.0.1:11434.' However, it does not explicitly compare against alternative tools or state when not to use this tool, so a 4 is appropriate.

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/lucasmaher-hash/touch-designer-mcp'

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