Skip to main content
Glama

Check a trade's profit after fees

check_profit
Read-onlyIdempotent

Is buying YES on Kalshi and NO on a Polymarket (or the reverse) profitable after both venues' fees? Send the contracts and each side's price in dollars (0 to 1); Layer applies each venue's fee schedule. Send polymarket (polymarket.com) or polymarket_us, not both. With kalshi.market_id, Layer looks up the fees and the match itself.

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": {
      "contracts": "<contracts>",
      "kalshi": "<kalshi>"
    },
    "name": "check_profit"
  }
}

Input Schema

NameRequiredDescriptionDefault
kalshiYes
contractsYesHow many contracts on each side.
polymarketNo
polymarket_usNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the bar is lower; the description still adds real behavior by stating that Layer applies each venue's fee schedule and that supplying market_id triggers fee-and-match lookup. It does not describe the response shape, though no output schema exists to cover that gap.

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 core question is front-loaded, followed by short imperative sentences covering the exclusivity rule and the market_id shortcut. No sentence is filler, and the parenthetical venue clarifications earn their space.

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

Completeness3/5

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

For a computation tool with no output schema, the description never says what comes back beyond the implied yes/no — no profit figure, per-contract basis, or breakeven threshold. Combined with thin schema coverage on the fee fields, an agent would know how to call it but not what to expect.

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 coverage is only 25%, so the description needs to compensate more than it does. It clarifies contracts, the 0-to-1 dollar price convention, and the polymarket/polymarket_us mutual exclusivity, but never mentions the category or fee_rate fields whose meanings live only in the sparse schema.

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 opens with a specific question that names the exact computation: whether buying YES on Kalshi and NO on Polymarket (or the reverse) is profitable after both venues' fees. That verb+resource framing clearly separates it from the sibling matching tools find_matches and lookup_match.

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 gives a concrete input rule ('Send polymarket or polymarket_us, not both') and a conditional shortcut ('With kalshi.market_id, Layer looks up the fees and the match itself'). It does not explicitly say when to reach for this versus find_matches/lookup_match, so the routing guidance is implicit rather than complete.

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.

Resources