# tools

Eight tools available through the YESNO MCP server. Each tool maps to a terminal API endpoint.

<details>

<summary><strong>get_markets</strong> — Fetch active prediction markets with optional filtering</summary>

**Auth**: Open

| Parameter | Type   | Required | Default | Description                                                                               |
| --------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------------- |
| `sector`  | string | No       | all     | Filter by sector (politics, crypto, sports, economy, geopolitics, tech, culture, science) |
| `sort`    | string | No       | volume  | Sort field (volume, price, change)                                                        |
| `limit`   | number | No       | 20      | Number of markets to return (max 100)                                                     |

**Example**:

```json
{
  "name": "get_markets",
  "arguments": {
    "sector": "politics",
    "sort": "volume",
    "limit": 10
  }
}
```

**Returns**: Array of markets with question, YES price, 24h change, volume, sector, token IDs.

</details>

<details>

<summary><strong>get_market_analysis</strong> — Run AI-powered analysis on a specific market</summary>

**Auth**: Required

| Parameter  | Type   | Required | Description                                  |
| ---------- | ------ | -------- | -------------------------------------------- |
| `question` | string | Yes      | Market question text                         |
| `yesOdds`  | number | No       | Current YES price (0-100)                    |
| `volume`   | number | No       | Market volume in USD                         |
| `tier`     | string | No       | Analysis tier: scout, analyst, or strategist |

**Example**:

```json
{
  "name": "get_market_analysis",
  "arguments": {
    "question": "Will Bitcoin reach $150,000 by June 2026?",
    "yesOdds": 35,
    "volume": 5000000,
    "tier": "analyst"
  }
}
```

**Returns**: AI verdict, confidence, intelligence brief, news articles, model used.

</details>

<details>

<summary><strong>get_market_signals</strong> — Get the 9 enriched signal categories for a market</summary>

**Auth**: Required

| Parameter      | Type   | Required | Description                   |
| -------------- | ------ | -------- | ----------------------------- |
| `tokenId`      | string | Yes\*    | Market token ID (YES token)   |
| `conditionId`  | string | Yes\*    | Market condition ID           |
| `question`     | string | No       | Market question (for context) |
| `currentPrice` | number | No       | Current price (0-1)           |

\*At least one of tokenId or conditionId required.

**Returns**: All 9 signal categories (momentum, volume, whales, holders, lifecycle, divergence, buy pressure, rotation, smart money) plus price history and top trades.

</details>

<details>

<summary><strong>get_order_book</strong> — Fetch the order book (bid/ask depth) for a market</summary>

**Auth**: Open

| Parameter | Type   | Required | Description     |
| --------- | ------ | -------- | --------------- |
| `tokenId` | string | Yes      | Market token ID |

**Returns**: Bids, asks, spread, midpoint, depth at various levels.

</details>

<details>

<summary><strong>get_whale_trades</strong> — Get large trades across all markets</summary>

**Auth**: Open

| Parameter  | Type   | Required | Description                               |
| ---------- | ------ | -------- | ----------------------------------------- |
| `minValue` | number | No       | Minimum trade value in USD (default: 500) |
| `limit`    | number | No       | Number of trades to return (default: 20)  |

**Returns**: Array of whale trades with market, side, size, price, timestamp.

</details>

<details>

<summary><strong>get_leaderboard</strong> — Top traders ranked by performance</summary>

**Auth**: Open

| Parameter    | Type   | Required | Description                               |
| ------------ | ------ | -------- | ----------------------------------------- |
| `timePeriod` | string | No       | Time period (24h, 7d, 30d, all)           |
| `limit`      | number | No       | Number of traders to return (default: 20) |

**Returns**: Array of traders with PnL, volume, win rate.

</details>

<details>

<summary><strong>get_news</strong> — Fetch recent news relevant to a market</summary>

**Auth**: Required

| Parameter  | Type   | Required | Description                            |
| ---------- | ------ | -------- | -------------------------------------- |
| `question` | string | Yes      | Market question text                   |
| `sector`   | string | No       | Market sector (for query optimization) |

**Returns**: Array of news articles with headline, source, snippet, date.

</details>

<details>

<summary><strong>get_holders</strong> — Top holders for a market's YES and NO positions</summary>

**Auth**: Open

| Parameter     | Type   | Required | Description                              |
| ------------- | ------ | -------- | ---------------------------------------- |
| `conditionId` | string | Yes      | Market condition ID                      |
| `limit`       | number | No       | Number of holders per side (default: 10) |

**Returns**: Top YES holders, top NO holders, with wallet addresses and share counts.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yesno-1.gitbook.io/yesno-docs/mcp-server/tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
