> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpulse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Diligence Review

> Give an AI agent Pulse MCP tools for document review, section routing, and evidence-backed answers.

## Goal

Let an agent inspect a long document, decide whether to extract, split, schema, or table it, and return an answer with source references.

## Sample Documents

Use [Blackstone Report](https://platform.runpulse.com/dashboard/examples/b63fca41-ee50-4a65-bd71-64188d5bdbf5) for financial narrative review or [Legal Filing](https://platform.runpulse.com/dashboard/examples/d4dfc1e2-60ac-4776-a5a8-20b88e68bf9f) for long legal review.

## Tool Path

```mermaid theme={null}
flowchart LR
    A[User question] --> B["MCP extract"]
    B --> C{Need routing?}
    C -->|Yes| D["split_document"]
    C -->|No| E["apply_schema"]
    D --> E
    B --> F["extract_tables"]
    E --> G[Answer with evidence]
    F --> G
```

## Prompt Template

```text theme={null}
Use Pulse to review this document:
https://platform.runpulse.com/api/examples/d4dfc1e2-60ac-4776-a5a8-20b88e68bf9f/pdf

First extract the document with page chunking. If sections are mixed, split it into
topics before applying schemas. Return:
1. A short summary.
2. The key parties and dates as JSON.
3. Any tables or schedules that appear material.
4. Page references for every important claim.

If a Pulse job is still processing, poll it with get_job.
```

## Agent Rules

* Extract once, then reuse `extraction_id`.
* Split before schema when different sections need different logic.
* Use `generate_schema` only when the schema is not already defined.
* Use `extract_tables` for schedules or financial tables instead of asking the model to infer table structure from prose.
* Ask the user for a presigned URL or local file path; hosted MCP cannot read local disk.
* Return uncertainties and missing fields explicitly.

## Related

<CardGroup cols={3}>
  <Card title="Agent Quickstart" icon="robot" href="/mcp/agent-quickstart">
    Connect an MCP client.
  </Card>

  <Card title="MCP Tools" icon="wrench" href="/mcp/tools">
    Tool parameters and returns.
  </Card>

  <Card title="Sample Documents" icon="file-pdf" href="/cookbooks/sample-documents">
    Public samples for agent tests.
  </Card>
</CardGroup>
