{"id":50846642,"url":"https://github.com/graphlit/graphlit-agent-tools","last_synced_at":"2026-06-14T10:04:32.503Z","repository":{"id":364167119,"uuid":"1266609304","full_name":"graphlit/graphlit-agent-tools","owner":"graphlit","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-11T22:19:24.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-12T00:09:14.665Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphlit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T19:31:28.000Z","updated_at":"2026-06-11T22:19:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/graphlit/graphlit-agent-tools","commit_stats":null,"previous_names":["graphlit/graphlit-agent-tools"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/graphlit/graphlit-agent-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphlit%2Fgraphlit-agent-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphlit%2Fgraphlit-agent-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphlit%2Fgraphlit-agent-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphlit%2Fgraphlit-agent-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphlit","download_url":"https://codeload.github.com/graphlit/graphlit-agent-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphlit%2Fgraphlit-agent-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34316861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-14T10:04:31.830Z","updated_at":"2026-06-14T10:04:32.487Z","avatar_url":"https://github.com/graphlit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @graphlit/agent-tools\n\nGive your agent the Graphlit retrieval tools it needs.\n\nAgents that answer from private knowledge need a small set of reliable abilities: retrieve the right Graphlit content, inspect the source behind a claim, and bring in fresh context when the knowledge base is missing something. `@graphlit/agent-tools` packages those abilities as small, framework-friendly tools backed by Graphlit.\n\nUse these tools with any agent harness that accepts structured tool definitions and async handlers: Graphlit `streamAgent()`, OpenAI Agents SDK, Mastra, Claude Agent SDK, Claude Managed Agents, the Vercel AI SDK, or your own loop.\n\n## Why Use It\n\n- **Give your agent private context**: retrieve from Graphlit-ingested documents, emails, events, messages, pages, posts, and files.\n- **Ground answers in inspectable sources**: return `contents://...` references your app can render or inspect before the agent makes source-backed claims.\n- **Handle real retrieval requests**: support semantic questions like \"what risks did the customer mention?\" and filter-only requests like \"all emails in the last week.\"\n- **Bring in fresh context when needed**: let the agent search the web, ingest a URL, and wait for processing before using newly added content.\n- **Keep control in the app**: choose the tools your agent should have without adding tool discovery, an MCP wrapper, or an approval layer.\n\n## Install\n\n```bash\nnpm install graphlit-client @graphlit/agent-tools\n```\n\nRun these tools server-side with Graphlit credentials. Do not expose Graphlit project credentials to the browser.\n\n## Tool Shape\n\nEvery tool creator returns the same three pieces:\n\n```typescript\ntype GraphlitAgentTool\u003cTArgs, TResult\u003e = {\n  // Zod schema for frameworks that accept Zod or Standard JSON Schema.\n  inputSchema: z.ZodType\u003cTArgs\u003e;\n\n  // Graphlit tool definition. The schema is also available as a JSON string.\n  tool: Types.ToolDefinitionInput;\n\n  // Async implementation. The handler validates args with Zod before calling Graphlit.\n  handler: (\n    args: TArgs,\n    artifacts?: StreamAgentArtifactCollector,\n    abortSignal?: AbortSignal,\n  ) =\u003e Promise\u003cTResult\u003e;\n};\n```\n\nThat shape is intentionally boring:\n\n- Use `tool` plus `handler` with Graphlit `streamAgent()`.\n- Use `inputSchema` plus `handler` with Zod/Standard-Schema frameworks like OpenAI Agents SDK and Mastra.\n- Use `inputSchema.shape` plus `handler` with Claude Agent SDK custom tools.\n- Use `JSON.parse(tool.schema)` plus `handler` with JSON Schema frameworks such as Claude Managed Agents custom tools.\n- Call `handler(args)` directly from any custom agent loop.\n\n## Tools\n\nPrefer `retrieve_contents` plus `inspect_content` as the default RAG pair. Add `analyze_prompt` when you want the model to produce a visible routing contract before retrieval. Add mutating, enrichment, and generation tools only when the host app wants the agent to have those abilities.\n\nFor read-only agent comparisons or customer-facing agents that should not mutate a Graphlit project, a good default set is `retrieve_contents`, `inspect_content`, `count_contents`, `list_resources`, `read_resource`, `web_search`, and `web_map`. When exposing resource tools in a constrained app, pass `allowedKinds` to keep the agent inside the resource surface you intend.\n\n### Read-Only Retrieval\n\n| Agent ability                    | Add this tool                        | What it does                                                                                                                                                 |\n| -------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Analyze a prompt before tool use | `createAnalyzePromptTool()`          | Return a compact routing contract for source scopes, subjects, evidence plan, answer shape, and next step. It does not retrieve evidence or mutate Graphlit. |\n| Retrieve Graphlit knowledge      | `createRetrieveContentsTool()`       | Find relevant ingested content for grounded answers.                                                                                                         |\n| Inspect a source                 | `createInspectContentTool()`         | Read fuller text, parent/child references, export URI text, or optional image descriptions from a returned `contents://...` source.                          |\n| Count content                    | `createCountContentsTool()`          | Count content matching public filters.                                                                                                                       |\n| Query facets                     | `createQueryContentFacetsTool()`     | Return content facet buckets for counts and filtering.                                                                                                       |\n| Retrieve communications          | `createRetrieveCommunicationsTool()` | Find emails, events, messages, posts, issues, and pull requests by topic, participants, domains, and recency.                                                |\n| Retrieve conversations           | `createRetrieveConversationsTool()`  | Search Graphlit conversations.                                                                                                                               |\n| Retrieve entities                | `createRetrieveEntitiesTool()`       | Retrieve knowledge-graph entities relevant to a prompt.                                                                                                      |\n| Retrieve facts                   | `createRetrieveFactsTool()`          | Retrieve facts relevant to a prompt and filter.                                                                                                              |\n| Lookup an entity                 | `createLookupEntityTool()`           | Resolve an entity by ID or name and return relationships.                                                                                                    |\n| Explore entities                 | `createExploreEntityTool()`          | Compose entity lookup, related facts, contents, and conversations.                                                                                           |\n| Retrieve images                  | `createRetrieveImagesTool()`         | Retrieve image content and optionally fetch image bytes.                                                                                                     |\n| Retrieve memories                | `createRetrieveMemoriesTool()`       | Retrieve memory content with `ContentTypes.Memory` locked internally.                                                                                        |\n| Query collections                | `createQueryCollectionsTool()`       | List collections.                                                                                                                                            |\n| Query feeds                      | `createQueryFeedsTool()`             | List feeds.                                                                                                                                                  |\n| Search the public web            | `createWebSearchTool()`              | Find current web leads without ingesting them.                                                                                                               |\n| Map a site                       | `createWebMapTool()`                 | Discover public URLs from a site map without ingesting them.                                                                                                 |\n| List resource URIs               | `createListResourcesTool()`          | List Graphlit resource URIs that `read_resource` can dereference.                                                                                            |\n| Read resource URIs               | `createReadResourceTool()`           | Read `contents://`, `collections://`, `feeds://`, `facts://`, `conversations://`, and `entities://` resources through SDK calls.                             |\n\n### Graphlit Content Mutation\n\nThese tools mutate Graphlit project state. Host applications should expose them intentionally and apply their own approval policy when needed.\n\n| Agent ability                     | Add this tool                              | What it does                                                         |\n| --------------------------------- | ------------------------------------------ | -------------------------------------------------------------------- |\n| Add a URL                         | `createIngestUrlTool()`                    | Save a public URL for later retrieval.                               |\n| Add text                          | `createIngestTextTool()`                   | Save raw text for later retrieval.                                   |\n| Add links                         | `createIngestLinksTool()`                  | Ingest public hyperlinks extracted from existing Graphlit content.   |\n| Screenshot a page                 | `createScreenshotPageTool()`               | Capture a public page screenshot into Graphlit.                      |\n| Create a collection               | `createCreateCollectionTool()`             | Create a collection.                                                 |\n| Add contents to collections       | `createAddContentsToCollectionTool()`      | Add content IDs to collections.                                      |\n| Remove contents from a collection | `createRemoveContentsFromCollectionTool()` | Remove content IDs from one collection.                              |\n| Delete a collection               | `createDeleteCollectionTool()`             | Delete a collection by ID or `collections://...` URI.                |\n| Add a content label               | `createAddContentLabelTool()`              | Add one label to one content item.                                   |\n| Remove a content label            | `createRemoveContentLabelTool()`           | Remove one label from one content item.                              |\n| Create a web crawl                | `createWebCrawlTool()`                     | Create a Graphlit web crawl feed. Defaults to a one-time crawl.      |\n| Wait for content processing       | `createWaitContentDoneTool()`              | Wait until a content item is ready.                                  |\n| Wait for feed sync                | `createWaitFeedDoneTool()`                 | Wait until a feed sync is ready.                                     |\n| Store memory                      | `createIngestMemoryTool()`                 | Store a Graphlit memory item. The public schema does not expose TTL. |\n| Delete memory                     | `createDeleteMemoryTool()`                 | Delete memory content after verifying `ContentTypes.Memory`.         |\n\n### Enrichment And Generation\n\nAvailability depends on the Graphlit project capabilities, connectors, and credits.\n\n| Agent ability    | Add this tool                 | What it does                                                                  |\n| ---------------- | ----------------------------- | ----------------------------------------------------------------------------- |\n| Enrich companies | `createEnrichCompaniesTool()` | Lookup company candidates and optionally create/enrich organization entities. |\n| Enrich persons   | `createEnrichPersonsTool()`   | Lookup person candidates and optionally create/enrich person entities.        |\n| Publish audio    | `createPublishAudioTool()`    | Generate audio content from text.                                             |\n| Publish image    | `createPublishImageTool()`    | Generate image content from a prompt.                                         |\n| Publish video    | `createPublishVideoTool()`    | Generate video content from a prompt.                                         |\n\nThis package intentionally does not export Zine/Dossium app-layer tools such as broad `inspect`, delivery tools (`draft_email`, `send_email`, social/channel/document/issue/calendar writers), shell/code execution, or first-party orchestration helpers. The resource tools are package-native Graphlit readers, not `platform__...` MCP runtime tools, and they do not read `skills://`, `ui://`, or external `https://` resources.\n\n## Graphlit streamAgent\n\n`streamAgent()` can use the returned Graphlit tool definitions and handlers directly.\n\n```typescript\nimport { Graphlit } from \"graphlit-client\";\nimport {\n  createInspectContentTool,\n  createRetrieveContentsTool,\n  createWebSearchTool,\n} from \"@graphlit/agent-tools\";\n\nconst client = new Graphlit(\n  process.env.GRAPHLIT_ORGANIZATION_ID!,\n  process.env.GRAPHLIT_ENVIRONMENT_ID!,\n  process.env.GRAPHLIT_JWT_SECRET!,\n);\n\nconst retrieveContents = createRetrieveContentsTool(client);\nconst inspectContent = createInspectContentTool(client);\nconst webSearch = createWebSearchTool(client);\n\nconst selectedTools = [retrieveContents, inspectContent, webSearch];\n\nawait client.streamAgent(\n  \"What customer emails from last week mention onboarding risk?\",\n  (event) =\u003e {\n    // Stream events to your UI.\n  },\n  undefined,\n  undefined,\n  selectedTools.map((item) =\u003e item.tool),\n  Object.fromEntries(\n    selectedTools.map((item) =\u003e [item.tool.name, item.handler]),\n  ),\n  { maxToolRounds: 8 },\n  undefined,\n  undefined,\n  undefined,\n  undefined,\n  undefined,\n  undefined,\n  [\n    \"Use retrieve_contents before answering questions that depend on ingested Graphlit content.\",\n    \"Use inspect_content when a retrieved source needs fuller text before making a source-backed claim.\",\n    \"If retrieved evidence is weak or missing, say so plainly.\",\n  ].join(\" \"),\n);\n```\n\n## Mastra\n\nMastra tools accept an `id`, `description`, Zod-compatible `inputSchema`, and `execute` function. Pass the Graphlit tool's `inputSchema` and delegate execution to the Graphlit handler.\n\n```typescript\nimport { Agent } from \"@mastra/core/agent\";\nimport { createTool } from \"@mastra/core/tools\";\nimport { Graphlit } from \"graphlit-client\";\nimport {\n  createInspectContentTool,\n  createRetrieveContentsTool,\n} from \"@graphlit/agent-tools\";\n\nconst graphlit = new Graphlit(\n  process.env.GRAPHLIT_ORGANIZATION_ID!,\n  process.env.GRAPHLIT_ENVIRONMENT_ID!,\n  process.env.GRAPHLIT_JWT_SECRET!,\n);\n\nconst retrieveContents = createRetrieveContentsTool(graphlit);\nconst inspectContent = createInspectContentTool(graphlit);\n\nconst mastraRetrieveContents = createTool({\n  id: retrieveContents.tool.name,\n  description:\n    retrieveContents.tool.description ?? \"Retrieve Graphlit content.\",\n  inputSchema: retrieveContents.inputSchema,\n  execute: async (args, context) =\u003e\n    retrieveContents.handler(args, undefined, context?.abortSignal),\n});\n\nconst mastraInspectContent = createTool({\n  id: inspectContent.tool.name,\n  description: inspectContent.tool.description ?? \"Inspect Graphlit content.\",\n  inputSchema: inspectContent.inputSchema,\n  execute: async (args, context) =\u003e\n    inspectContent.handler(args, undefined, context?.abortSignal),\n});\n\nexport const customerKnowledgeAgent = new Agent({\n  id: \"customer-knowledge-agent\",\n  name: \"Customer Knowledge Agent\",\n  model: \"openai/gpt-5.5\",\n  instructions: [\n    \"Answer from Graphlit content when the user asks about private knowledge.\",\n    \"Use retrieve_contents to find relevant content.\",\n    \"Use inspect_content before making answer-critical source-backed claims.\",\n  ].join(\" \"),\n  tools: {\n    [retrieveContents.tool.name]: mastraRetrieveContents,\n    [inspectContent.tool.name]: mastraInspectContent,\n  },\n});\n\nawait customerKnowledgeAgent.generate(\n  \"Which customer emails from last week mention onboarding risk?\",\n);\n```\n\n## OpenAI Agents SDK\n\nOpenAI Agents SDK tools accept a `name`, `description`, Zod `parameters`, and `execute` function. Wrap the Graphlit handler as a function tool. Graphlit's SDK already handles its own OpenAI Responses API use internally; this adapter only exposes Graphlit retrieval as an OpenAI Agents SDK tool.\n\n```typescript\nimport { Agent, run, tool } from \"@openai/agents\";\nimport { Graphlit } from \"graphlit-client\";\nimport {\n  createInspectContentTool,\n  createRetrieveContentsTool,\n} from \"@graphlit/agent-tools\";\n\nconst graphlit = new Graphlit(\n  process.env.GRAPHLIT_ORGANIZATION_ID!,\n  process.env.GRAPHLIT_ENVIRONMENT_ID!,\n  process.env.GRAPHLIT_JWT_SECRET!,\n);\n\nconst retrieveContents = createRetrieveContentsTool(graphlit);\nconst inspectContent = createInspectContentTool(graphlit);\n\nconst openaiRetrieveContents = tool({\n  name: retrieveContents.tool.name,\n  description:\n    retrieveContents.tool.description ?? \"Retrieve Graphlit content.\",\n  parameters: retrieveContents.inputSchema,\n  async execute(args) {\n    return retrieveContents.handler(args);\n  },\n});\n\nconst openaiInspectContent = tool({\n  name: inspectContent.tool.name,\n  description: inspectContent.tool.description ?? \"Inspect Graphlit content.\",\n  parameters: inspectContent.inputSchema,\n  async execute(args) {\n    return inspectContent.handler(args);\n  },\n});\n\nconst customerKnowledgeAgent = new Agent({\n  name: \"Customer Knowledge Agent\",\n  model: \"gpt-5.5\",\n  instructions: [\n    \"Answer from Graphlit content when the user asks about private knowledge.\",\n    \"Use retrieve_contents to find relevant content.\",\n    \"Use inspect_content before making answer-critical source-backed claims.\",\n  ].join(\" \"),\n  tools: [openaiRetrieveContents, openaiInspectContent],\n});\n\nconst result = await run(\n  customerKnowledgeAgent,\n  \"Which customer emails from last week mention onboarding risk?\",\n);\n\nconsole.log(result.finalOutput);\n```\n\n## Claude Agent SDK\n\nClaude Agent SDK custom tools run through an in-process MCP server. Its TypeScript `tool()` helper expects a Zod raw shape, so pass `inputSchema.shape`.\n\n```typescript\nimport {\n  createSdkMcpServer,\n  query,\n  tool,\n} from \"@anthropic-ai/claude-agent-sdk\";\nimport { Graphlit } from \"graphlit-client\";\nimport {\n  createInspectContentTool,\n  createRetrieveContentsTool,\n} from \"@graphlit/agent-tools\";\n\nconst graphlit = new Graphlit(\n  process.env.GRAPHLIT_ORGANIZATION_ID!,\n  process.env.GRAPHLIT_ENVIRONMENT_ID!,\n  process.env.GRAPHLIT_JWT_SECRET!,\n);\n\nconst retrieveContents = createRetrieveContentsTool(graphlit);\nconst inspectContent = createInspectContentTool(graphlit);\n\nconst claudeRetrieveContents = tool(\n  retrieveContents.tool.name,\n  retrieveContents.tool.description ?? \"Retrieve Graphlit content.\",\n  retrieveContents.inputSchema.shape,\n  async (args) =\u003e {\n    const result = await retrieveContents.handler(args);\n\n    return {\n      content: [{ type: \"text\", text: JSON.stringify(result) }],\n      structuredContent: result,\n    };\n  },\n  { annotations: { readOnlyHint: true, openWorldHint: true } },\n);\n\nconst claudeInspectContent = tool(\n  inspectContent.tool.name,\n  inspectContent.tool.description ?? \"Inspect Graphlit content.\",\n  inspectContent.inputSchema.shape,\n  async (args) =\u003e {\n    const result = await inspectContent.handler(args);\n\n    return {\n      content: [{ type: \"text\", text: JSON.stringify(result) }],\n      structuredContent: result,\n    };\n  },\n  { annotations: { readOnlyHint: true, openWorldHint: true } },\n);\n\nconst graphlitServer = createSdkMcpServer({\n  name: \"graphlit\",\n  version: \"1.0.0\",\n  tools: [claudeRetrieveContents, claudeInspectContent],\n});\n\nfor await (const message of query({\n  prompt: \"Summarize the customer emails from last week about onboarding risk.\",\n  options: {\n    mcpServers: { graphlit: graphlitServer },\n    allowedTools: [\n      \"mcp__graphlit__retrieve_contents\",\n      \"mcp__graphlit__inspect_content\",\n    ],\n  },\n})) {\n  if (message.type === \"result\" \u0026\u0026 message.subtype === \"success\") {\n    console.log(message.result);\n  }\n}\n```\n\n## Claude Managed Agents\n\nClaude Managed Agents custom tools are client-executed: Claude emits a structured tool request, your application runs the Graphlit handler, then sends the result back to the session.\n\n```typescript\nimport Anthropic from \"@anthropic-ai/sdk\";\nimport { Graphlit } from \"graphlit-client\";\nimport {\n  createInspectContentTool,\n  createRetrieveContentsTool,\n} from \"@graphlit/agent-tools\";\n\nconst anthropic = new Anthropic({\n  apiKey: process.env.ANTHROPIC_API_KEY!,\n});\n\nconst graphlit = new Graphlit(\n  process.env.GRAPHLIT_ORGANIZATION_ID!,\n  process.env.GRAPHLIT_ENVIRONMENT_ID!,\n  process.env.GRAPHLIT_JWT_SECRET!,\n);\n\nconst graphlitTools = [\n  createRetrieveContentsTool(graphlit),\n  createInspectContentTool(graphlit),\n];\n\nconst handlers = Object.fromEntries(\n  graphlitTools.map((item) =\u003e [item.tool.name, item.handler]),\n);\n\nconst agent = await anthropic.beta.agents.create({\n  name: \"Customer Knowledge Agent\",\n  model: \"claude-opus-4-8\",\n  tools: graphlitTools.map((item) =\u003e ({\n    type: \"custom\" as const,\n    name: item.tool.name,\n    description: item.tool.description ?? `Run ${item.tool.name}.`,\n    input_schema: JSON.parse(item.tool.schema),\n  })),\n});\n\nconst session = await anthropic.beta.sessions.create({\n  agent: agent.id,\n  environment_id: process.env.ANTHROPIC_ENVIRONMENT_ID!,\n});\n\nconst stream = await anthropic.beta.sessions.events.stream(session.id);\n\nawait anthropic.beta.sessions.events.send(session.id, {\n  events: [\n    {\n      type: \"user.message\",\n      content: [\n        {\n          type: \"text\",\n          text: \"Which customer emails from last week mention onboarding risk?\",\n        },\n      ],\n    },\n  ],\n});\n\nfor await (const event of stream) {\n  if (event.type === \"agent.custom_tool_use\") {\n    const handler = handlers[event.name];\n    if (!handler) continue;\n\n    const result = await handler(event.input);\n\n    await anthropic.beta.sessions.events.send(session.id, {\n      events: [\n        {\n          type: \"user.custom_tool_result\",\n          custom_tool_use_id: event.id,\n          content: [{ type: \"text\", text: JSON.stringify(result) }],\n        },\n      ],\n    });\n  }\n\n  if (\n    event.type === \"session.status_idle\" \u0026\u0026\n    event.stop_reason?.type === \"end_turn\"\n  ) {\n    break;\n  }\n}\n```\n\n## Realistic Retrieval Examples\n\n`retrieve_contents` supports both semantic retrieval and filter-only content lookup.\n\nFor a prompt such as \"show me all emails from last week,\" the tool can be called without a text search:\n\n```typescript\nawait retrieveContents.handler({\n  type: \"EMAIL\",\n  inLast: \"P7D\",\n  limit: 25,\n});\n```\n\nFor RAG over specific content text, pass `search`:\n\n```typescript\nawait retrieveContents.handler({\n  search: \"onboarding risk renewal blocker\",\n  type: \"EMAIL\",\n  inLast: \"P30D\",\n  limit: 10,\n});\n```\n\nFor upcoming calendar context:\n\n```typescript\nawait retrieveContents.handler({\n  type: \"EVENT\",\n  inNext: \"P7D\",\n  limit: 20,\n});\n```\n\nWhen answer-critical evidence needs more context, inspect the `contents://...` reference returned by retrieval:\n\n```typescript\nawait inspectContent.handler({\n  resourceUri: \"contents://content-id-from-retrieve-contents\",\n  mode: \"markdown\",\n});\n```\n\n## Notes\n\n- Tool schemas are authored with Zod and converted to Graphlit `ToolDefinitionInput`.\n- Public options reuse `graphlit-client` SDK types where possible, including `Types.ContentFilter`, `Types.EntityReferenceInput`, `Types.RetrievalStrategyInput`, and `Types.RerankingStrategyInput`.\n- Returned retrieval results include `contents://...` resource URIs for UI source rendering and follow-up inspection.\n- This package is a set of explicit tools. It does not include tool discovery, tool bundles, MCP server hosting, approval middleware, or app-specific routing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphlit%2Fgraphlit-agent-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphlit%2Fgraphlit-agent-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphlit%2Fgraphlit-agent-tools/lists"}