Skip to main content
Glama
TMHSDigital

Local AI MCP

Official
by TMHSDigital

Delegate a task to the best local model

delegate

Routes a task to a suitable local model by choosing loaded or installed options that fit free VRAM, then runs inference, with optional catalog download or hosted fallback.

Instructions

ONE CALL to offload work locally: pick the best model for a task on THIS machine, make it ready, and run it. Prefers models already loaded (no load cost), then installed models that fit your free VRAM, then (with allowPull) the best catalog model that fits. Task specialists (coder, vision, reasoning) win over general models; larger fitting models win over smaller. Never uses a hosted provider unless allowHosted is true. Returns the completion plus a 'routing' block explaining the choice.

Input Schema

NameRequiredDescriptionDefault
seedNoSeed for reproducible sampling
stopNoStop sequences
taskYesWhat kind of work this is
topKNo
topPNo
promptNoPlain prompt text (alternative to messages)
streamNoStream tokens (default true). Progress notifications are sent when the client provides a progressToken.
systemNoSystem instruction
optionsNoProvider-specific extras passed through as-is
messagesNoChat messages; content may be a string or text/image parts (vision models)
providerNoRestrict to one provider. Omit to let the server choose (local providers only, unless LOCAL_AI_ALLOW_HOSTED_FALLBACK is set).
allowPullNoDownload a catalog model if nothing suitable is installed (default false)
maxTokensNoMaximum tokens to generate
allowHostedNoAllow hosted providers (default false)
temperatureNoSampling temperature
maxSizeBytesNoIgnore models larger than this
contextLengthNoContext window to run with (Ollama num_ctx). Raise it for long inputs to avoid truncation.
repeatPenaltyNo
responseFormatNoConstrain output to JSON (json_object) or a JSON Schema (json_schema); the result includes a validated 'parsed' value

Output Schema

NameRequiredDescriptionDefault
textYes
modelYes
routingYes
providerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.8/5.0
Behavior5/5

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

The description details critical operational behaviors beyond simple parameter input, including VRAM constraints, preference hierarchy (specialists > general, large > small), and confirms the return structure includes a 'routing' block explaining the choice made.

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?

The description is densely packed, but the structure is logical, moving from the core operation to resource constraints, selection logic, and finally the host fallback. Every sentence contributes to the agent's operational understanding.

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 high parameter count and the complexity of local AI deployment, the description is extremely complete, addressing selection hierarchy, resource limits (VRAM), and external connectivity (hosted providers).

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

Parameters4/5

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

While schema coverage is high (84%), the description adds vital semantic meaning to parameters by explaining how 'task' (e.g., 'coder' vs 'general') influences model selection priority and how 'allowPull' interacts with VRAM constraints.

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 that the tool runs a complex, single-call LLM task ('delegate') while explicitly defining the logic for model selection on the local machine, differentiating it from simple model listing or searching.

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

Usage Guidelines5/5

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

It provides explicit hierarchical guidelines for usage: local first (already loaded -> installed -> catalog/pull), and clearly identifies the 'allowHosted' flag as the explicit escape hatch to hosted providers, giving perfect usage context.

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