Available MCP tools
| Tool | Description |
|---|---|
parse_cas | Parse a CAS PDF and return structured holdings and metadata. |
enrich | Add returns and benchmark overlays to holdings. |
request_upload_url | Create a browser-upload session for file handoff. |
compare_snapshots | Compare two portfolio snapshots. |
generate_report | Export a snapshot as JSON or CSV. |
Example workflow
User asks an agent to parse a CAS and summarize the portfolio.
1. parse_cas → get snapshot_id and holdings
2. enrich → attach market context
3. agent summarizes current value, diversification, and available next actions
Node.js example
const fs = require('fs');
async function parseCAS(filePath, password) {
const pdfBase64 = fs.readFileSync(filePath).toString('base64');
const res = await fetch('https://api.portfoliointel.co.in/api/v1/parse', {
method: 'POST',
headers: {
Authorization: 'Bearer sk_live_YOUR_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ pdf_base64: pdfBase64, password }),
});
const body = await res.json();
if (!body.success) throw new Error(body.error.message);
return body.data;
}
Python example
import base64
import requests
def parse_cas(file_path: str, password: str | None = None) -> dict:
with open(file_path, 'rb') as handle:
pdf_base64 = base64.b64encode(handle.read()).decode()
resp = requests.post(
'https://api.portfoliointel.co.in/api/v1/parse',
headers={'Authorization': 'Bearer sk_live_YOUR_KEY'},
json={'pdf_base64': pdf_base64, 'password': password},
)
resp.raise_for_status()
return resp.json()['data']
cURL sandbox example
curl -X POST https://api.portfoliointel.co.in/api/v1/parse \
-H "Authorization: Bearer sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"pdf_ref":"sample_cams_2024"}'
Docs MCP note
The browser docs and the docs MCP server should eventually read from the same generated docs corpus. The current worker endpoint is available at docs-mcp.portfoliointel.co.in/mcp.