Skip to main content
Glama

Close position (sells holdings)

close_position
Destructive

⚠️ Irreversible: this executes a real on-chain sell of the position's remaining holdings. Close a specific position — cancels pending orders and creates a sell order for remaining holdings

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": {
      "thesisId": "<thesisId>"
    },
    "name": "close_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
userIdNoThe user ID. Optional when connected with OAuth (defaults to the authorized user); required with an API key (call get_me).
thesisIdYesThe position thesis ID to close

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

The annotations already declare a destructive, non-read-only, non-idempotent operation. The description adds meaningful behavioral detail beyond the annotations: it is irreversible, executes a real on-chain sell, cancels pending orders, and sells remaining holdings.

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?

The description is front-loaded with an irreversible warning and then states the action in two compact sentences. Every sentence adds relevant information without repetition.

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 destructive on-chain action with no output schema, the description covers the key mechanics and irreversibility warning. It could be slightly more complete by naming close_all_positions as the alternative or by describing the resulting order/status, but the core context is present.

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 input schema has 100% description coverage for both parameters, including the OAuth/API-key distinction for userId. The description does not add parameter-specific semantics beyond the schema, so the baseline of 3 is appropriate.

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 states a specific action and resource: close a specific position, cancel pending orders, and create a sell order for remaining holdings. The word "specific" distinguishes it from close_all_positions.

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 is implied by "specific position," which suggests it is not the close-all workflow, but the description does not explicitly name alternatives or state when not to use it. It gives enough context to infer the basic use case but no explicit routing guidance.

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.