# get_last_error

Get the last error code and description.

Agent View of the PolicyLayer registry record for `get_last_error`. HTML page: https://policylayer.com/tools/af7007-mcp-trader/get-last-error

## Facts

- Tool: `get_last_error`
- Server: MCP Trader Server (`af7007/mcp-trader`) — https://policylayer.com/tools/af7007-mcp-trader.md
- Homepage: https://github.com/Af7007/mcp-trader
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

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

## Why get_last_error is rated Low

This tool retrieves diagnostic information (error codes and descriptions) from the trading system. It is purely informational—it reads error state without creating, modifying, deleting data, or executing trades. Even in the context of a financial trading server, this specific tool has no capability to move money, execute orders, or make irreversible changes.

From the tool's own definition: "Tool name 'get_last_error' and description 'Get the last error code and description' indicate a retrieval operation with no side effects. It queries error state without modifying system state or triggering actions."

## Use case

AI agents call get_last_error to retrieve information from MCP Trader Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches MCP Trader Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get_last_error": {}
  }
}
```

## Other tools on MCP Trader Server (44)

- `cancel_order` — Destructive — https://policylayer.com/tools/af7007-mcp-trader/cancel-order.md
- `close_positions_by_symbol` — Destructive — https://policylayer.com/tools/af7007-mcp-trader/close-positions-by-symbol.md
- `delete_model` — Destructive — https://policylayer.com/tools/af7007-mcp-trader/delete-model.md
- `chat_completion` — Execute — https://policylayer.com/tools/af7007-mcp-trader/chat-completion.md
- `initialize` — Execute — https://policylayer.com/tools/af7007-mcp-trader/initialize.md
- `pull_model` — Execute — https://policylayer.com/tools/af7007-mcp-trader/pull-model.md
- `shutdown` — Execute — https://policylayer.com/tools/af7007-mcp-trader/shutdown.md
- `buy_limit` — Financial — https://policylayer.com/tools/af7007-mcp-trader/buy-limit.md
- `buy_market` — Financial — https://policylayer.com/tools/af7007-mcp-trader/buy-market.md
- `buy_stop` — Financial — https://policylayer.com/tools/af7007-mcp-trader/buy-stop.md
- `close_all_positions` — Financial — https://policylayer.com/tools/af7007-mcp-trader/close-all-positions.md
- `close_position` — Financial — https://policylayer.com/tools/af7007-mcp-trader/close-position.md
- `login` — Financial — https://policylayer.com/tools/af7007-mcp-trader/login.md
- `order_send` — Financial — https://policylayer.com/tools/af7007-mcp-trader/order-send.md
- `sell_limit` — Financial — https://policylayer.com/tools/af7007-mcp-trader/sell-limit.md
- `sell_market` — Financial — https://policylayer.com/tools/af7007-mcp-trader/sell-market.md
- `sell_stop` — Financial — https://policylayer.com/tools/af7007-mcp-trader/sell-stop.md
- `generate_text` — Other — https://policylayer.com/tools/af7007-mcp-trader/generate-text.md
- `analyze_trading_intent` — Read — https://policylayer.com/tools/af7007-mcp-trader/analyze-trading-intent.md
- `check_ollama_health` — Read — https://policylayer.com/tools/af7007-mcp-trader/check-ollama-health.md
- `copy_rates_from_date` — Read — https://policylayer.com/tools/af7007-mcp-trader/copy-rates-from-date.md
- `copy_rates_from_pos` — Read — https://policylayer.com/tools/af7007-mcp-trader/copy-rates-from-pos.md
- `copy_rates_range` — Read — https://policylayer.com/tools/af7007-mcp-trader/copy-rates-range.md
- `copy_ticks_from_date` — Read — https://policylayer.com/tools/af7007-mcp-trader/copy-ticks-from-date.md
- `copy_ticks_range` — Read — https://policylayer.com/tools/af7007-mcp-trader/copy-ticks-range.md
- `get_account_info` — Read — https://policylayer.com/tools/af7007-mcp-trader/get-account-info.md
- `get_available_models` — Read — https://policylayer.com/tools/af7007-mcp-trader/get-available-models.md
- `get_symbol_info` — Read — https://policylayer.com/tools/af7007-mcp-trader/get-symbol-info.md
- `get_symbol_info_tick` — Read — https://policylayer.com/tools/af7007-mcp-trader/get-symbol-info-tick.md
- `get_symbols` — Read — https://policylayer.com/tools/af7007-mcp-trader/get-symbols.md
- …and 14 more: https://policylayer.com/tools/af7007-mcp-trader.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=af7007-mcp-trader · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/af7007-mcp-trader
