Skip to main content
Glama

P&L Drivers

tt_pnl_drivers
Read-onlyIdempotent

What drove the signed-in user's P&L TODAY (or in the latest session): every strategy ranked by its P&L for ONE session, the top gainers and losers in ₹ with their share of the move, and the instruments/legs that moved each one. Use it for "what drove my P&L", "why is my P&L down today", "which strategy made/lost money today / yesterday".

Needs NO strategy id — it reads the caller's own book, so never ask the user for a SID for this. Live intraday when today has trades; otherwise the latest completed session (reconciled). date YYYY-MM-DD pins a session. It covers the book the user's SAVED dashboard filter keeps (the phone's Today and the dashboard header) — say which, from book.covers, and split live vs Live Offline (the paper_pnl field) when both moved. Live, total_pnl is the dashboard P&L card's figure on its default Expiry view (booked_pnl + open_pnl, carried positions marked from yesterday's close); today_view_pnl is the card's Today view. DESCRIPTIVE only — no stop/fund advice. AUTH-REQUIRED.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tt_pnl_drivers"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD to pin one session; omit for today (or the latest session with any P&L).
top_nNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent annotations, it discloses live-intraday vs latest-reconciled-session fallback, the saved-dashboard-filter scoping via book.covers, the Live vs Live Offline split on paper_pnl, and the difference between total_pnl (Expiry view) and today_view_pnl (Today view). It also flags AUTH-REQUIRED and that output is descriptive only with no advice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and each clause carries domain information an agent needs. The prose is dense and stacks several field-level asides (book.covers, paper_pnl, booked_pnl + open_pnl) in long sentences, which slightly hurts scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description helpfully names the key return fields and how to interpret them (total_pnl vs today_view_pnl, paper_pnl). It still does not outline the overall response structure or the meaning of top_n, leaving a small gap for a two-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The `date` explanation (YYYY-MM-DD pins one session, omit for today/latest) largely repeats the schema's own description, and `top_n` — which has no schema description — is only implicitly covered by "top gainers and losers." With 50% schema coverage, the description partially but not fully compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource and output shape: every strategy ranked by P&L for one session, top gainers/losers in ₹ with share of move, and the instruments/legs behind each. It is clearly a read-only diagnostic of the caller's own book, which distinguishes it from strategy-authoring or backtest siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit trigger phrases ("what drove my P&L", "which strategy made/lost money today") and a strong negative instruction not to ask the user for a SID. It does not name alternative tools or state when to prefer another P&L view, so it falls short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources