Skip to main content
Glama
paperinvest

Paper MCP Server

by paperinvest

create_order

Submit trading orders on the Paper platform, specifying portfolio, stock symbol, quantity, order side, type, and other parameters for execution.

Instructions

Create a new trading order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetClassNoAsset class (default: EQUITY)
limitPriceNoLimit price (for limit orders)
portfolioIdYesPortfolio ID
quantityYesNumber of shares
sessionNoTrading session (default: REGULAR)
sideYesOrder side
stopPriceNoStop price (for stop orders)
symbolYesStock symbol
timeInForceNoTime in force (default: DAY)
typeYesOrder type

Implementation Reference

  • Handler logic for the 'create_order' tool. Posts order details to the '/orders' API endpoint, spreading input arguments and applying defaults for assetClass, session, and timeInForce.
    case 'create_order':
      response = await api.post('/orders', {
        ...args,
        assetClass: args.assetClass || 'EQUITY',
        session: args.session || 'REGULAR',
        timeInForce: args.timeInForce || 'DAY'
      });
      break;
  • Tool definition including name, description, and detailed input schema with properties, enums, and required fields for the 'create_order' tool.
      name: 'create_order',
      description: 'Create a new trading order',
      inputSchema: {
        type: 'object',
        properties: {
          portfolioId: { type: 'string', description: 'Portfolio ID' },
          symbol: { type: 'string', description: 'Stock symbol' },
          quantity: { type: 'number', description: 'Number of shares' },
          side: { 
            type: 'string', 
            enum: ['BUY_TO_OPEN', 'SELL_TO_CLOSE', 'SELL_TO_OPEN', 'BUY_TO_CLOSE'],
            description: 'Order side'
          },
          type: { 
            type: 'string', 
            enum: ['MARKET', 'LIMIT', 'STOP', 'STOP_LIMIT'],
            description: 'Order type'
          },
          timeInForce: {
            type: 'string',
            enum: ['DAY', 'GTC', 'IOC', 'FOK'],
            description: 'Time in force (default: DAY)'
          },
          limitPrice: { type: 'number', description: 'Limit price (for limit orders)' },
          stopPrice: { type: 'number', description: 'Stop price (for stop orders)' },
          assetClass: { type: 'string', description: 'Asset class (default: EQUITY)' },
          session: { type: 'string', description: 'Trading session (default: REGULAR)' }
        },
        required: ['portfolioId', 'symbol', 'quantity', 'side', 'type']
      }
    },
  • src/index.ts:388-392 (registration)
    Registers all tools, including 'create_order', with the MCP server by handling ListToolsRequestSchema and returning the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create a new trading order' implies a write/mutation operation but doesn't disclose critical behavioral aspects like authentication requirements, rate limits, whether the order executes immediately or is queued, what happens on failure, or what the response contains. This is inadequate for a financial transaction tool.

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 a single, focused sentence with zero wasted words. It's appropriately sized for a tool with comprehensive schema documentation and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

For a complex financial trading tool with 10 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after order creation, error conditions, or how this integrates with the broader trading system. The agent would need to guess about the tool's behavior and response format.

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 schema has 100% description coverage, so parameters are well-documented in the structured schema. The description adds no additional parameter semantics beyond the generic 'trading order' context. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('create') and resource ('new trading order'), making the purpose immediately understandable. However, it doesn't distinguish this from sibling tools like 'create_batch_orders' or specify what makes a 'trading order' different from other order types in the system.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'create_batch_orders' or 'cancel_order'. There's no mention of prerequisites, constraints, or typical scenarios for creating individual orders versus batch operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paperinvest/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server