Skip to main content
Glama
Factor MCP Server

Factor MCP Server

Official
by FactorDAO

factor_hl_vault_realized_pnl

Calculate realized PnL for a HyperLiquid FACTOR vault by summing closedPnl from closing fills, with gross/net fee totals and coin/dex attribution over optional Unix-ms windows.

Instructions

Realized PnL aggregation over a time window for a HyperLiquid FACTOR vault. Sums closedPnl across closing fills (gross + net of fees), with attribution by coin and by dex. Optional startTime/endTime in unix ms — without a window the call considers all recent fills. HyperEVM (chain 999) only. Read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "vault": "<vault>"
    },
    "name": "factor_hl_vault_realized_pnl"
  }
}

Input Schema

NameRequiredDescriptionDefault
vaultYesVault contract address.
endTimeNoUnix ms — latest fill to include (optional).
startTimeNoUnix ms — earliest fill to include (optional).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.9

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does so well: it declares read-only behavior, discloses that both gross and net-of-fees figures are produced, states the default no-window behavior, and restricts scope to HyperEVM chain 999. Gaps remain around result limits or pagination for 'all recent fills' and whether errors surface for non-999 vaults.

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

Conciseness5/5

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

Four tight sentences, front-loaded with the core operation, then the computation method, the parameter defaults, and the chain restriction. No filler and nothing buried.

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?

For a read-only aggregation with no output schema, the description conveys enough about the result shape (gross and net, attributed by coin and by dex) to set expectations. Missing are details on how large the 'all recent fills' default window is and what the response envelope looks like, which would fully close the gap.

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?

Schema coverage is 100%, so baseline is 3; the description does add a little beyond the schema, notably the default behavior when startTime/endTime are omitted and the meaning of vault as a FACTOR vault address. It does not add format or boundary details (timezone, inclusive/exclusive bounds) beyond what the schema already states.

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

Purpose4/5

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

The description states a specific verb and resource: aggregation of realized PnL over a time window for a HyperLiquid FACTOR vault, computed by summing `closedPnl` over closing fills. It implicitly separates itself from raw-fill siblings like factor_hl_vault_fills, but never names an alternative explicitly, which keeps it just short of a 5.

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

Usage Guidelines3/5

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

Usage context is implied by describing what the tool computes and by the 'without a window the call considers all recent fills' default, but there is no explicit when-to-use/when-not guidance or routing to alternatives such as the fills or funding tools. An agent can infer the use case but is not told the selection criteria.

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

Deploy Server

Other Tools