Skip to content

Add TPSL support for MCP#122

Merged
alexex10 merged 4 commits into
starknetfrom
task/add-tpsl-support-to-mcp
Jul 6, 2026
Merged

Add TPSL support for MCP#122
alexex10 merged 4 commits into
starknetfrom
task/add-tpsl-support-to-mcp

Conversation

@alexex10

@alexex10 alexex10 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Support TPSL placement via MCP
  • Move placer order tool to a separate module

Demo

image image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the MCP (Model Context Protocol) private place_order tool to support attaching Take-Profit / Stop-Loss (TPSL) triggers, and refactors the MCP private tool registration by extracting the order placement logic into a dedicated module.

Changes:

  • Added take_profit, stop_loss, and tp_sl_type inputs to the MCP place_order tool and wired them into create_order_object(...).
  • Moved place_order tool implementation out of private_tools.py into a new place_order_tool.py.
  • Centralized private REST client creation into x10/tools/mcp/utils.py and updated private MCP tools to use it.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
x10/tools/mcp/utils.py Adds a shared helper to build an authenticated REST client for private MCP tools.
x10/tools/mcp/private_tools.py Refactors tool registration to delegate place_order to the new module and reuses the shared REST client factory.
x10/tools/mcp/place_order_tool.py Introduces the TPSL-enabled place_order MCP tool and supporting orderbook-based pricing logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread x10/tools/mcp/private_tools.py Outdated
Comment thread x10/tools/mcp/place_order_tool.py Outdated
Comment thread x10/tools/mcp/place_order_tool.py Outdated
Comment thread x10/tools/mcp/place_order_tool.py Outdated
Comment thread x10/tools/mcp/place_order_tool.py
Comment thread x10/tools/mcp/place_order_tool.py
@alexex10
alexex10 marked this pull request as ready for review July 6, 2026 13:42
@alexex10
alexex10 merged commit 13df008 into starknet Jul 6, 2026
8 checks passed
@alexex10
alexex10 deleted the task/add-tpsl-support-to-mcp branch July 13, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants