Skip to main content
Glama

Hand a task to a cheaper model

delegate

Hand a piece of work to a cheaper model through Leanfare, to save your own context and usage. Best for work that reads a lot and answers briefly: search or summarize big files, logs or many documents, review a file, draft a section.

Instructions

Hand a piece of work to a cheaper model through Leanfare, to save your own context and usage. Best for work that reads a lot and answers briefly: search or summarize big files, logs or many documents, review a file, draft a section. Name the files in files: Leanfare reads them itself, so their text never enters your context. Leanfare picks the cheapest model the user ticked that rates well enough for the kind and effort, and returns a short answer with a receipt (the model, the cost, the tokens kept out of your context). Every high effort answer, and a sample of the others, is checked by a stronger model, blind and from another company when one can take it; a failed check is asked again one tier up. One that takes more than about 40 seconds answers with an id instead and keeps working: call delegate again with only that id to get the answer, or with that id and stop true to stop it (what its model did so far may have been charged). Costs count toward the user's Leanfare budget.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "delegate"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe id an earlier delegate answered with while it was still working: give only this to get that answer (or with stop, to stop it).
kindNoread: find, pull out or summarize from the files. write: draft text or code. reason: work something out (a bug's cause, a plan, a proof). Leave it out to let Leanfare guess.
stopNoWith id: true stops that hand off while it still works. Nothing else is needed with it.
taskNoWhat to do, written for a model that has not seen this conversation: the goal, what to look for, and the form of answer you want (for example: a list of file:line, one line each).
checkNoauto (the default) has a stronger model check every high effort answer, 1 in 4 medium ones and 1 in 10 low ones.
filesNoText files for Leanfare to read and hand over with the task: full paths, ~/ paths, or paths relative to folder. At most 50 files, 2 MB each, 4 MB in all. Files that hold secrets (.env files, private keys, credentials) are refused.
levelNoThe Leanfare level for this chat or session, as the level tool or Leanfare's prompt line gave it. Leave it out when none was given.
speedNoAt the same quality: "cheapest" (however long it takes), "balanced" (time and cost weighed alike), "fastest" (whatever it costs), or a number of seconds to answer within, like "30". Default: the user's choice in Leanfare.
effortNoHow good the model must be: low takes the cheapest rated within 80 points of the best model the user ticked, medium within 40, high within 15. Also the thinking effort for models that think. Default medium.
folderNoThe folder relative paths start from. By default, the folder the MCP client started Leanfare in (in Claude Code, the project).
privateNotrue keeps this task on the user's computer: only models there (Ollama) take it, and its check too. Use it for anything sensitive or personal, or when the user asks.
max_tokensNoThe longest answer to allow, in tokens (default 8,192).
your_modelNoThe model you run on, as your own instructions name it (for example claude-opus-5-5). Leanfare names it for the work that stays with you, and the report shows it as the prompt's main model.
your_effortNoThe thinking effort you run at, when you know it. The report shows it with your model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.15.5
    • changedInput schema / properties / id / description
      Previous value: -"The id an earlier delegate answered with while it was still working: give only this to get that answer."New value: +"The id an earlier delegate answered with while it was still working: give only this to get that answer (or with stop, to stop it)."
    • addedInput schema / properties / stop
      Added value: +{
      +  "description": "With id: true stops that hand off while it still works. Nothing else is needed with it.",
      +  "type": "boolean"
      +}
  2. First observedv0.15.1

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the async behavior (>40 seconds returns an id and keeps working), that stopping may still charge for work already done, that every high-effort answer plus a sample of others is checked by a stronger model and retried one tier up on failure, and that costs count against the user's Leanfare budget. It also states that secrets-bearing files are refused and that file text never enters the caller's context. Nothing here contradicts readOnlyHint=false, destructiveHint=false, or openWorldHint=true.

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?

Front-loaded with the purpose and the best-fit work in the first two sentences, then the async and verification mechanics. The paragraph is dense and slightly run-on in places (the 40-second/id/stop sentence carries three instructions), but for a tool with 14 parameters and non-obvious async semantics the length is largely earned.

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?

There is no output schema, yet the description still tells the caller what a response looks like (a short answer with a receipt naming model, cost, and tokens saved) and the alternate id-based response. Combined with the retry, stop, and budget behavior, an agent has everything needed to call it and to handle both return shapes correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: that files are read by Leanfare itself and never enter the caller's context, and that a returned id plus stop is a two-field stop protocol. The speed/effort tradeoff is described conceptually in prose as well. It still leaves the caller to read the schema for exact enum semantics of check and the per-tier thresholds for speed.

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

Purpose4/5

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

States a specific action and resource: it hands a piece of work to a cheaper model via Leanfare and returns a short answer with a receipt. It also scopes the work class precisely ("work that reads a lot and answers briefly: search or summarize big files, logs or many documents, review a file, draft a section"). It never names a sibling such as ask or helper, so the agent must infer the boundary from wording alone.

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?

Gives clear when-to-use guidance, including the criteria for using it (offload heavy reading, save context and usage) and a specific condition for private=true (sensitive or personal work, or when the user asks). It also explains the continuation case (call again with only the id, or with id plus stop). It does not explicitly say when NOT to use it versus a sibling, so the alternative-selection guidance is implied rather than stated.

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