Skip to main content
Glama

luxalgo-mcp-server

Log a trade by hand

journal_add_trade
Idempotent

Log a trade by adding its fills to a manual or import journal account (never a broker-synced one — the sync owns those). The journal derives trades from fills: a long round trip is a buy fill then a sell fill, a short is sell then buy, scale-ins and partial exits are just more fills, and a lone fill opens a position. Times are ISO 8601 instants with offset; fees are per fill. Fills identical to existing ones are skipped as duplicates. Returns the insert counts and the trade(s) the fills now belong to, with keys for journal_update_trade. Correcting or removing an existing fill is done in the app, not here. Requires signing in with a LuxAlgo account (OAuth).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fillsYesThe fills, in any order.
contextYesExplain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution."
accountIdYesA `manual` or `import` account id from journal_list_accounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: trade-derivation semantics (round trips, scale-ins, lone fills opening positions), ISO 8601 offset requirement, per-fill fee semantics, duplicate-skip behavior that concretely enriches the idempotentHint=true annotation, the return shape (insert counts, trades, keys), and OAuth sign-in requirement. The write semantics are consistent with readOnlyHint=false and add no contradiction.

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?

The description is long (~5 sentences) but every clause earns its place: scope restriction, derivation rules, time format, dedupe behavior, return value, exclusions, and auth. It is front-loaded with the core purpose. It could be marginally leaner (e.g., the derivation rules could partly live in the fills schema), but for a tool with genuinely complex trade-formation semantics, the density is justified.

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

Completeness5/5

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

Complete for this tool's complexity. There is no output schema, and the description correctly shoulders that burden by explaining the return value (insert counts, resulting trades, keys). All required parameters are covered by the schema, and the description supplies the non-obvious semantics — how fills map to trades, account-type restrictions, dedupe, and auth — that an agent needs to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds genuine value by explaining how fills relate to each other to form trades — critical for populating the fills array correctly — plus per-fill fee semantics and duplicate behavior. The schema already documents ISO 8601 and fee defaults, so the description supplements rather than carries the parameter meaning alone.

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?

States a specific verb and resource: 'Log a trade by adding its fills to a manual or import journal account.' It goes further by naming the account-type scope (never broker-synced) and explicitly ties to siblings — journal_update_trade for follow-up edits and journal_list_accounts as the accountId source. An agent can distinguish this tool from its journal siblings without opening the schema.

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

Usage Guidelines5/5

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

Provides explicit when-to-use (manual/import journal accounts) and when-not-to-use ('never a broker-synced one — the sync owns those') guidance. It also states what this tool does not do ('Correcting or removing an existing fill is done in the app, not here') and points to the successor action via 'with key's for journal_update_trade.' Little is left to inference.

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.