{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/prefer-a-task-shaped-tool-to-an-open-ended-one",
  "id": "MHC-D-RESEARCH-0310",
  "version": "0.1.0",
  "title": "Prefer a task-shaped tool to an open-ended one",
  "summary": "A function named `create_invoice_draft` has fewer dangerous interpretations than `run_anything`.",
  "kind": "principle",
  "body": "When practical, expose a function whose inputs and effects match the intended action instead of an open-ended executor. Narrow tools make authorization, validation, logging and testing more specific. General tools remain useful for expert work, but they deserve stronger containment because their action space is much larger.",
  "limits": [
    "Over-fragmented tools can make workflows brittle; use the narrowest interface that still represents the real job."
  ],
  "topics": [
    "union-ai-agent-control"
  ],
  "intents": [],
  "source_ids": [
    "RS-EEEBBCF69A614717"
  ],
  "evidence": [
    {
      "claim": "OWASP recommends avoiding open-ended agent extensions where more granular task-specific functionality can be used.",
      "source_id": "RS-EEEBBCF69A614717",
      "role": "supports",
      "note": "General tools may be justified for expert workflows, but they require stronger containment and authorization.",
      "locator": "Avoid open-ended extensions"
    }
  ],
  "use_when": [
    "An agent can accomplish a job either through a narrow function or through a general shell, browser or arbitrary-request tool."
  ],
  "avoid_when": [
    "Over-fragmented tools can make workflows brittle; use the narrowest interface that still represents the real job."
  ],
  "example": "Use a repository file-update function for a known path rather than giving a content agent an unrestricted shell.",
  "check": "The chosen tool exposes no broad capability merely because it was easier to integrate.",
  "sources": [
    {
      "id": "RS-EEEBBCF69A614717",
      "title": "LLM06:2025 Excessive Agency",
      "url": "https://genai.owasp.org/llmrisk/llm062025-excessive-agency/"
    }
  ],
  "relations": [],
  "collections": [
    {
      "id": "RC-EEF5F4530C11FD17",
      "title": "Let AI do useful work without giving it accidental authority",
      "url": "/collections/let-ai-do-useful-work-without-giving-it-accidental-authority"
    }
  ]
}
