Skip to main content
Glama

Prepare task context

dm.prepare_task_memory

Prepare approved, permission-filtered DM context. Contract 2.0.0 requires an explicit intent: lookup is read-only and creates no Task or Execution; start creates one durable Task/Execution; resume refreshes one authorized Execution. Legacy callers retain the 1.6.0 prepare behavior. This tool never approves untrusted content.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task": "<task>"
    },
    "name": "dm.prepare_task_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYes
toolNo
intentNoExplicit v2 lifecycle intent. Required with contract_version 2.0.0; omitted only for the legacy 1.6.0 prepare behavior.
projectNo
task_idNoDM-issued durable Task id. Never inferred from task prose.
task_typeNo
thread_idNoOptional task/session continuity identifier (same concept as dm.search_decisions' thread_id). When set, TASK-scoped episodic memory captured under this thread_id is eligible for recall.
agent_typeNo
componentsNo
repositoryNo
actor_factsNo
environmentNo
token_budgetNo
resource_factsNo
task_referenceNoOptional stable label for this task that the agent will reuse in dm.submit_memory_update. Defaults to the start of `task`. Used to link a later report when the agent does not echo task_execution_id.
condition_factsNo
contract_versionNo1.6.0
intended_actionsNo
repository_branchNo
task_execution_idNoDM-issued Execution id required by the explicit resume intent.
provider_session_idNoOptional agent-claimed client/session identifier. Stored as 'agent-claimed'; DM never verifies it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing side effects per intent (lookup creates no Task or Execution, start creates one durable Task/Execution, resume refreshes an Execution), the permission-filtering guarantee, and that it never approves untrusted content. The annotations only say readOnly=false / non-destructive / non-idempotent, so this mode-level disclosure is the real value. Nothing describes return shape or token-budget effects.

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?

Four tightly packed sentences, front-loaded with the core purpose and then the intent semantics. Slightly dense jargon ('Contract 2.0.0', 'legacy 1.6.0 prepare behavior') but no wasted sentences.

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

Completeness3/5

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

For a 21-parameter, nested-object, mutation-capable tool with no output schema, the description covers lifecycle side effects but not what context is actually returned, how token_budget shapes the response, or how the fact bags are used. Adequate for choosing the intent, incomplete for confidently populating the request.

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 only 29% across 21 parameters, so the description must compensate and it only partly does: it explains the three intent values and the contract_version legacy escape hatch, which are the highest-risk inputs. The other eighteen parameters (token_budget, actor_facts, resource_facts, components, repository, etc.) receive no meaning from the description.

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 verb and resource ('Prepare approved, permission-filtered DM context') and pins down the three lifecycle modes the tool can perform. It is clearly distinct from the memory-write siblings, though the notion of 'DM context' is left somewhat abstract.

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 explicit mode-level guidance: lookup is read-only and creates nothing, start creates one durable Task/Execution, resume refreshes an authorized Execution, and legacy callers keep the 1.6.0 behavior. It does not name or exclude any sibling tool (e.g. dm.ensure_context, dm.submit_memory_update), so cross-tool routing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources