Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/schema-declare-called-endpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nansen-cli": patch
---

Declare the API routes `alerts`, `account`, `web` and `agent` already call in `src/schema.json`. The schema is what shell completions, `--help` and docs tooling read, so eight routes the code requests were invisible to them (and to the API/MCP/CLI parity check).
13 changes: 13 additions & 0 deletions src/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,7 @@
"description": "Smart alert management — create, update, toggle, delete alerts",
"subcommands": {
"list": {
"endpoint": "/api/v1/smart-alert/list",
"description": "List all alerts",
"returns": [
"id",
Expand All @@ -1399,7 +1400,9 @@
]
},
"create": {
"endpoint": "/api/v1/smart-alert",
"description": "Create a new alert",
"notes": "Sent as POST /api/v1/smart-alert. alerts update PATCHes the same path; the schema declares routes by path only, so the two subcommands intentionally share one endpoint entry and one credit cost.",
"options": {
"name": {
"type": "string",
Expand Down Expand Up @@ -1450,7 +1453,9 @@
}
},
"update": {
"endpoint": "/api/v1/smart-alert",
"description": "Update an existing alert. Usage: nansen alerts update <id> [options]",
"notes": "Sent as PATCH /api/v1/smart-alert. alerts create POSTs the same path; the schema declares routes by path only, so the two subcommands intentionally share one endpoint entry and one credit cost.",
"options": {
"name": {
"type": "string",
Expand Down Expand Up @@ -1503,6 +1508,7 @@
}
},
"toggle": {
"endpoint": "/api/v1/smart-alert/toggle",
"description": "Enable or disable an alert. Usage: nansen alerts toggle <id> --enabled|--disabled",
"options": {
"enabled": {
Expand Down Expand Up @@ -1842,6 +1848,7 @@
}
},
"account": {
"endpoint": "/api/v1/account",
"description": "Show API key status, plan, and remaining credits. Does not consume credits."
},
"auth": {
Expand Down Expand Up @@ -1898,6 +1905,7 @@
"description": "Web search and fetch commands",
"subcommands": {
"search": {
"endpoint": "/api/v1/search/web-search",
"description": "Search the web for one or more queries in parallel",
"options": {
"query": {
Expand All @@ -1916,6 +1924,7 @@
]
},
"fetch": {
"endpoint": "/api/v1/search/web-fetch",
"description": "Fetch and analyze content from one or more URLs using AI",
"options": {
"url": {
Expand All @@ -1935,6 +1944,10 @@
}
},
"agent": {
"apiEndpoints": [
"/api/v1/agent/fast",
"/api/v1/agent/expert"
],
"description": "Nansen AI research agent — ask questions about wallets, tokens, and on-chain activity",
"options": {
"expert": {
Expand Down