diff --git a/.changeset/schema-declare-called-endpoints.md b/.changeset/schema-declare-called-endpoints.md new file mode 100644 index 00000000..d407ecb2 --- /dev/null +++ b/.changeset/schema-declare-called-endpoints.md @@ -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). diff --git a/src/schema.json b/src/schema.json index c2002450..93abda89 100644 --- a/src/schema.json +++ b/src/schema.json @@ -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", @@ -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", @@ -1450,7 +1453,9 @@ } }, "update": { + "endpoint": "/api/v1/smart-alert", "description": "Update an existing alert. Usage: nansen alerts update [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", @@ -1503,6 +1508,7 @@ } }, "toggle": { + "endpoint": "/api/v1/smart-alert/toggle", "description": "Enable or disable an alert. Usage: nansen alerts toggle --enabled|--disabled", "options": { "enabled": { @@ -1842,6 +1848,7 @@ } }, "account": { + "endpoint": "/api/v1/account", "description": "Show API key status, plan, and remaining credits. Does not consume credits." }, "auth": { @@ -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": { @@ -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": { @@ -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": {