# rank

URL: /business/nouns/problem/rank · Id: `verb:Problem.rank` · Call: `await $.Problem.rank({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Rank orders Problems by revenue at stake, Evidence grade and effort, so the next Project addresses the top one.

Rank orders [Problems](/business/nouns/problem) by revenue at stake, [Evidence](/business/nouns/evidence) grade and effort, so the next [Project](/business/nouns/project) addresses the top one.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `icp` | [ICP](/business/nouns/icp) | No | The ICP whose Problems to rank; omitted, every ICP. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `problems` | list of [Problem](/business/nouns/problem) | Yes | Problems, highest first, each with its score. |

## Effects
- Emits [`Problem.ranked`](/business/events/Problem.ranked).
- Performed by the [Product Lead](/agents/product/product-lead).
- Two-way: it runs at once, in the `try`, `send` and `do` modes.
- Reads the Founding Hypothesis slot each Problem binds to and its weakest Evidence grade.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Problem.rank](/business/nouns/problem/rank) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Rank the latest problem.
```

**API**

```bash
curl -X POST https://api.sb/patentpad.com/problems/rank \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"icp":"icp_1"}'
```

```json
{
  "api": "https://api.sb/patentpad.com",
  "problems": [
    {
      "$id": "https://api.sb/patentpad.com/problems/problem_1",
      "$type": "Problem",
      "statement": "Drafts provisional patents for solo inventors."
    }
  ],
  "action": {
    "$id": "https://api.sb/patentpad.com/actions/action_1",
    "operation": "Problem.rank",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/patentpad.com/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const problems = await $.Problem.rank({ icp: 'icp_1' })
```

**CLI**

```bash
npx startup-builder do Problem.rank --json '{"icp":"icp_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Problem.rank({ icp: 'icp_1' })"
  }
}
```

Guides that call it: [What are people asking for](/start/guides/what-are-people-asking-for).