{
  "access": "public",
  "type": "reference",
  "format": "markdown",
  "title": "Library Tools Reference",
  "chunked": true,
  "url": "https://library.datagrout.ai/library-tools",
  "summary": "The Library suite provides semantic search and retrieval over DataGrout's documentation, tool references, feature guides, and research papers. Use these tools to find answers about how DataGrout works without leaving your agent workflow.",
  "content_markdown": "# Library Tools\n\nThe Library suite provides semantic search and retrieval over DataGrout's documentation, tool references, feature guides, and research papers. Use these tools to find answers about how DataGrout works without leaving your agent workflow.\n\n## library.search\n\nSearch documentation and papers by natural language query. Returns ranked results with titles, sections, snippets, and refs for retrieval.\n\n**0 credits** — pure discovery.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `query` | string | yes | Natural language search query |\n| `type` | string | no | Filter by content type: `reference`, `tutorial`, `paper`, `overview`, `all` (default: `all`) |\n| `suite` | string | no | Filter to a specific tool suite slug, e.g. `warden`, `flow`, `logic` |\n| `limit` | integer | no | Max results, 1-15 (default: 5) |\n\n### Example\n\n```json\n{\n  \"query\": \"how does flow.route branching work\",\n  \"type\": \"reference\",\n  \"limit\": 3\n}\n```\n\nResponse:\n\n```json\n{\n  \"success\": true,\n  \"results\": [\n    {\n      \"ref\": \"flow-inspect-tools#flow-route\",\n      \"title\": \"Flow & Inspect Tools Reference\",\n      \"section\": \"flow.route\",\n      \"snippet\": \"Routes execution across branches based on field conditions...\",\n      \"score\": 0.89,\n      \"type\": \"reference\"\n    }\n  ],\n  \"total\": 1,\n  \"query\": \"how does flow.route branching work\"\n}\n```\n\n### Tips\n\n- Use specific questions: \"how does warden.canary differ from warden.intent\" works better than \"warden\"\n- Filter by `suite` when you know which tool area you're looking for\n- Use `type: \"paper\"` to search research papers specifically\n- The `ref` field in results is the key for `library.get`\n\n---\n\n## library.get\n\nRetrieve documentation or paper content by ref. Use refs from `library.search` results, or pass a known slug directly.\n\n**0 credits** — pure retrieval.\n\n### Parameters\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `ref` | string | yes | Document slug or `slug#section` from search results. Prefix with `paper:` for research papers. |\n| `goal` | string | no | If provided, returns only the section most relevant to this goal. |\n\n### Ref Format\n\nRefs follow these patterns:\n- `\"flow-inspect-tools\"` — full library document\n- `\"flow-inspect-tools#flow-route\"` — specific section within a document\n- `\"paper:ail\"` — research paper\n- `\"paper:ail#search-endpoint\"` — section within a paper\n\n### Example\n\n```json\n{\n  \"ref\": \"warden-tools#which-tool-to-use\"\n}\n```\n\nResponse:\n\n```json\n{\n  \"success\": true,\n  \"ref\": \"warden-tools\",\n  \"title\": \"Warden Tools Reference\",\n  \"type\": \"reference\",\n  \"content_markdown\": \"## Which tool to use\\n\\n| Situation | Tool | Why |\\n...\",\n  \"word_count\": 450,\n  \"url\": \"https://library.datagrout.ai/warden-tools\"\n}\n```\n\n### Goal-Directed Retrieval\n\nWhen you know what you're looking for but not which section contains it, pass a `goal`:\n\n```json\n{\n  \"ref\": \"flow-inspect-tools\",\n  \"goal\": \"how to validate a workflow before executing it\"\n}\n```\n\nThis returns only the most relevant section instead of the full document, reducing token consumption.\n\n---\n\n## Workflow: Search then Get\n\nThe typical pattern is:\n\n1. **Search** for what you need:\n   ```json\n   {\"query\": \"prompt injection detection\", \"limit\": 3}\n   ```\n\n2. **Get** the most relevant result:\n   ```json\n   {\"ref\": \"warden-tools#warden-ensemble\"}\n   ```\n\n3. **Read** the returned markdown content and apply it.\n\nThis two-step pattern keeps token usage minimal — search returns lightweight summaries, get returns only the content you need.\n\n---\n\n## Available Content\n\nThe library includes:\n\n- **Tool references** — Detailed docs for every tool suite (Warden, Flow, Logic, Prism, etc.)\n- **Feature guides** — Multiplexing, discovery engine, policy & security, credits\n- **Getting started** — Quick start, core concepts, Conduit SDK\n- **Connectivity** — Authentication, JSON-RPC, tool naming conventions\n- **Guides** — Playground, sandbox, inspectors, building workflows\n- **Research papers** — AIL, Semio, CTC, Governor, Arbiter, Warden, and more\n\nUse `library.search` with `type: \"paper\"` to find research papers, or `type: \"tutorial\"` for step-by-step guides.\n"
}