From b54b1312adc03654e5250cf4f2802b267f11111f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 14:41:06 +0000 Subject: [PATCH] Version Packages --- .changeset/example-calls-name-free.md | 25 ------------------------- CHANGELOG.md | 26 ++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 27 insertions(+), 26 deletions(-) delete mode 100644 .changeset/example-calls-name-free.md diff --git a/.changeset/example-calls-name-free.md b/.changeset/example-calls-name-free.md deleted file mode 100644 index cb72332..0000000 --- a/.changeset/example-calls-name-free.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"@iqai/defillama-mcp": patch ---- - -Fix the upstream defect where every `exampleCall` in the endpoint catalog hard-coded a protocol slug, chain name, stablecoin id, pool UUID, or token address — values the model would copy verbatim from `search_docs` output and pass to the endpoint, often hitting null responses. The reported case was `defillama.fees.getFeesSummary({ protocol: 'uniswap' })` failing because the fees catalog has no unversioned `uniswap` slug (only `uniswap-v2`, `uniswap-v3`, `uniswap-labs`, etc.). - -Every `exampleCall` in `src/mcp/catalog/tool-metadata.ts` now demonstrates the discovery flow before the call: - -- Protocol-slug endpoints (`getProtocol`, `getDexSummary`, `getFeesSummary`, `getOptionsSummary`): `const slug = await defillama.resolveProtocol(name); await defillama.<...>({ protocol: slug })` -- Chain-name endpoints (`getHistoricalChainTvl`, `getDexsOverview`, `getFeesOverview`, `getOptionsOverview`): `const {name} = await defillama.resolveChain(input); await defillama.<...>({ chain: name })` -- Chain-slug endpoints (coins.llama.fi: `getBlockAtTimestamp`, all `price.*`): `const {slug} = await defillama.resolveChain(input); ...` -- Stablecoin charts: resolves both chain and stablecoin id first -- Yield historical pool data: discovers the opaque pool UUID via `getLatestPools()` first -- Price endpoints' `coins` parameter: built as `` `${slug}:${tokenAddress}` `` from the resolved chain slug plus a caller-supplied address (no DefiLlama-side address discovery exists, so the description documents the user/wallet/explorer source) - -Parameter `.describe()` strings updated in parallel: dropped the "(e.g. 'lido', 'uniswap', 'aave-v3')" format-by-example pattern and replaced it with explicit pointers to `defillama.resolveProtocol(name)` / `defillama.resolveChain(input)` / `defillama.resolveStablecoin(symbol)` and the relevant enumerate-via-`get*Overview` fallback. Each description now says explicitly: "never construct it by transforming a display name." - -Cookbook recipes touched for the same hazard: - -- `instructions.md` — "Price coin format" section now shows the template-string form with a resolver-first code block; drops the literal WETH address. -- `02-dex-volume-leaderboard.md`, `05-token-price-history.md`, `06-block-at-timestamp-tvl.md` — take a `chainInput` (and `tokenAddress` where relevant) parameter on the `run` function instead of hard-coding `"Ethereum"` and a USDT address. -- `08-resolve-names.md` — resolver demonstrations now take `{ chainInput, protocolInput, stablecoinInput }` parameters. -- `09-find-protocol-slug.md` — resolver call takes `protocolInput`; the "Once you have the canonical slug" follow-up bullets now show endpoint calls using the `slug` variable instead of literal `"aave-v3"` / `"uniswap-v3"` / `"lyra"`; also adds a note that fees / DEX / options each have a distinct slug namespace (which is why an unversioned guess against the fees catalog fails). - -Equivalent class of bug to debank-mcp issue #89. The regenerated `embedded-index.ts` and `instructions.generated.ts` ship the new examples to the agent surface. diff --git a/CHANGELOG.md b/CHANGELOG.md index 516961b..334f82b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # @iqai/defillama-mcp +## 1.0.7 + +### Patch Changes + +- [#26](https://github.com/IQAIcom/mcp-defillama/pull/26) [`f9dc3a8`](https://github.com/IQAIcom/mcp-defillama/commit/f9dc3a863db034c0179e992ba005f84121b99aa3) Thanks [@Aliiiu](https://github.com/Aliiiu)! - Fix the upstream defect where every `exampleCall` in the endpoint catalog hard-coded a protocol slug, chain name, stablecoin id, pool UUID, or token address — values the model would copy verbatim from `search_docs` output and pass to the endpoint, often hitting null responses. The reported case was `defillama.fees.getFeesSummary({ protocol: 'uniswap' })` failing because the fees catalog has no unversioned `uniswap` slug (only `uniswap-v2`, `uniswap-v3`, `uniswap-labs`, etc.). + + Every `exampleCall` in `src/mcp/catalog/tool-metadata.ts` now demonstrates the discovery flow before the call: + + - Protocol-slug endpoints (`getProtocol`, `getDexSummary`, `getFeesSummary`, `getOptionsSummary`): `const slug = await defillama.resolveProtocol(name); await defillama.<...>({ protocol: slug })` + - Chain-name endpoints (`getHistoricalChainTvl`, `getDexsOverview`, `getFeesOverview`, `getOptionsOverview`): `const {name} = await defillama.resolveChain(input); await defillama.<...>({ chain: name })` + - Chain-slug endpoints (coins.llama.fi: `getBlockAtTimestamp`, all `price.*`): `const {slug} = await defillama.resolveChain(input); ...` + - Stablecoin charts: resolves both chain and stablecoin id first + - Yield historical pool data: discovers the opaque pool UUID via `getLatestPools()` first + - Price endpoints' `coins` parameter: built as `` `${slug}:${tokenAddress}` `` from the resolved chain slug plus a caller-supplied address (no DefiLlama-side address discovery exists, so the description documents the user/wallet/explorer source) + + Parameter `.describe()` strings updated in parallel: dropped the "(e.g. 'lido', 'uniswap', 'aave-v3')" format-by-example pattern and replaced it with explicit pointers to `defillama.resolveProtocol(name)` / `defillama.resolveChain(input)` / `defillama.resolveStablecoin(symbol)` and the relevant enumerate-via-`get*Overview` fallback. Each description now says explicitly: "never construct it by transforming a display name." + + Cookbook recipes touched for the same hazard: + + - `instructions.md` — "Price coin format" section now shows the template-string form with a resolver-first code block; drops the literal WETH address. + - `02-dex-volume-leaderboard.md`, `05-token-price-history.md`, `06-block-at-timestamp-tvl.md` — take a `chainInput` (and `tokenAddress` where relevant) parameter on the `run` function instead of hard-coding `"Ethereum"` and a USDT address. + - `08-resolve-names.md` — resolver demonstrations now take `{ chainInput, protocolInput, stablecoinInput }` parameters. + - `09-find-protocol-slug.md` — resolver call takes `protocolInput`; the "Once you have the canonical slug" follow-up bullets now show endpoint calls using the `slug` variable instead of literal `"aave-v3"` / `"uniswap-v3"` / `"lyra"`; also adds a note that fees / DEX / options each have a distinct slug namespace (which is why an unversioned guess against the fees catalog fails). + + Equivalent class of bug to debank-mcp issue #89. The regenerated `embedded-index.ts` and `instructions.generated.ts` ship the new examples to the agent surface. + ## 1.0.6 ### Patch Changes diff --git a/package.json b/package.json index 9ff8d61..6bc0cc1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iqai/defillama-mcp", - "version": "1.0.6", + "version": "1.0.7", "description": "Standalone MCP server for DefiLlama data access", "main": "dist/index.js", "type": "module",