Skip to main content
Glama

close_quote

The quote that exits account's open position in instrument before expiry: reads the position, takes the opposite side (long -> sell, short -> buy), size = min(|position|, quantity or the whole position), and returns the desk's signed quote with the fillOrderAs calldata in fill.send. You must send it with your own key before validUntil (hedgehood close <instrument> --send or the npm MCP's close_position); this server never sends. nothing_to_close when the account is flat there; a close_only:* refusal from the desk is returned with its reason.

Input Schema

NameRequiredDescriptionDefault
accountYes
quantityNo
instrumentYes
session_keyNo

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?

With no annotations, the description carries the full burden and does so: it discloses that the server never sends, that the caller must sign and submit with their own key before validUntil, the exact sizing rule min(|position|, quantity or whole position), where the calldata lands (fill.send / fillOrderAs), and the two refusal modes (nothing_to_close, close_only:*). That is exactly the mutation/safety context the annotations would otherwise supply.

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 critical scoping clause comes first and every sentence adds information. It is dense but justified given the signing/refusal semantics; the inline parenthetical alternatives could be trimmed slightly but nothing is filler.

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?

With no annotations and no output schema, the description still covers return shape (signed quote with fillOrderAs calldata in fill.send), submission responsibility, expiry, and failure modes. The only genuine hole is the undocumented session_key, which matters for actually calling it.

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 description coverage is 0%, so the description must compensate. It does well for `quantity` (defines the min() sizing and the whole-position default) and implicitly for `account`/`instrument`, but `session_key` is never mentioned anywhere, leaving one of four parameters fully undocumented.

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 first sentence gives a precise verb and resource: it produces a quote that closes (exits) an open position in a named instrument, and it spells out the sizing and side logic. That distinguishes it cleanly from the sibling get_quote (which opens/quotes generically) without needing to open either schema.

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 says clearly when to use it (to exit an open position before expiry) and when it is inapplicable (nothing_to_close when the account is flat). It also names the concrete send paths (`hedgehood close --send` or npm MCP's close_position), but it never contrasts with the sibling get_quote for the opposite intent, so an agent must infer the open-vs-close split.

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.