MCP Tools
MCP tool reference, code samples, and example workflows.
Available MCP tools
Section titled “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. |
list_skills | List available analysis skills (structured workflows with reasoning). |
run_skill | Run an analysis skill against a parsed snapshot — returns flagged holdings with severity and reasoning. |
Skills
Section titled “Skills”Skills are higher-order analysis workflows that chain tools and apply domain-specific evaluation criteria. Unlike raw tools, skills produce structured reports with severity ratings and plain-English reasoning. See the Skills page for details, available skills, and usage examples.
Example workflow
Section titled “Example workflow”User asks an agent to parse a CAS and summarize the portfolio.
1. parse_cas → get snapshot_id and holdings2. enrich → attach market context3. agent summarizes current value, diversification, and available next actionsNode.js example
Section titled “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
Section titled “Python example”import base64import 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
Section titled “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"}'