Skip to content

feat(skill): rebuild discovery around find_tools - #84

Merged
lxcong merged 2 commits into
chainbase-labs:mainfrom
zzir:feat/find-tools-update
Aug 4, 2026
Merged

feat(skill): rebuild discovery around find_tools#84
lxcong merged 2 commits into
chainbase-labs:mainfrom
zzir:feat/find-tools-update

Conversation

@zzir

@zzir zzir commented Aug 4, 2026

Copy link
Copy Markdown
Member

Change Type

  • Routing logic change (SKILL.md)

Description

The skill had drifted several server versions behind, to the point of being
actively wrong:

  • The execute examples still used the retired aggregate-dispatch model
    (agentkey_social with a nested path, agentkey_search with type="news").
    Those calls now 400 — core.Lookup("news") has no match. The whole "Common
    Calls" section was removed rather than repaired: find_tools is accurate
    enough that hardcoded no-discovery shortcuts are pure decay.
  • Only 4 of the 9 categories were documented — finance, ecommerce, business,
    weather and travel were unreachable in practice.
  • agentkey_account was listed as an MCP tool; it is execute_tool(name=…).
  • The upstream-failure fallback the server sends in its own instructions
    (sibling surface, sibling version, alternate provider) was missing.

Discovery is now a single find_tools path (q= / prefix= / both / neither),
with list_tools marked deprecated. No concrete Provider/Operation name
appears anywhere in the skill — names go stale, and a stale example teaches a
name the model will later hallucinate.

references/cost-aware.md and references/setup.md are synced to match.

Important

Depends on server-side find_tools prefix= support shipping first. Please
hold the merge until that is live, since merging cuts a release.

Checklist

  • No knowledge added to SKILL.md (routing logic only)
  • Reference guides follow the existing structure

The "New social platform" / "New service or provider" sections don't apply
and were removed. Heads-up: they reference references/social/ and
references/<category>/, which no longer exist in this repo, and the
"standard structure" section they point to is absent from CONTRIBUTING.md.


Contributor Agreement

  • I confirm my contribution is licensed under the Apache License, Version 2.0 (see LICENSE).

The skill had drifted several server versions behind, to the point of being
actively wrong:
- The execute examples still used the retired aggregate-dispatch model
  (agentkey_social with a nested path, agentkey_search with type="news").
  Those calls now 400 — core.Lookup("news") has no match. The whole "Common
  Calls" section was broken and is removed rather than repaired; find_tools
  is accurate enough that hardcoded no-discovery shortcuts are pure decay.
- Only 4 of the 9 categories were documented. finance, ecommerce, business,
  weather and travel were unreachable in practice.
- agentkey_account was listed as an MCP tool; it is execute_tool(name=...).
- The upstream-failure fallback the server sends in its own instructions
  (sibling surface, sibling version, alternate provider) was missing.
Discovery is now one find_tools path (q= / prefix= / both / neither), with
list_tools noted as deprecated. No concrete Provider/Operation name appears
anywhere in the skill: names go stale, and a stale example teaches a name
the model will later hallucinate. Each step consumes the string the previous
step returned, with an explicit self-check for when it doesn't.
Requires the server-side find_tools prefix support to ship first.
Copilot AI lite review requested due to automatic review settings August 4, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the AgentKey skill routing documentation to remove stale, server-version-dependent tool naming and make discovery consistently flow through find_tools, aligning SKILL guidance and reference docs with the current MCP catalog model.

Changes:

  • Replaced legacy list_tools/aggregate-dispatch examples with a unified find_toolsdescribe_toolexecute_tool discovery/execution flow.
  • Expanded and clarified catalog coverage (all major categories) and added documented upstream-failure fallback strategies.
  • Synced setup and cost-aware reference guides to reflect the new discovery-first approach and list_tools deprecation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
skills/agentkey/SKILL.md Rebuilds skill routing/discovery guidance around find_tools and removes stale hardcoded operation examples.
skills/agentkey/references/setup.md Updates setup reference to reflect the current tool surface (and list_tools deprecation status).
skills/agentkey/references/cost-aware.md Adjusts batch-cost guidance to leverage find_tools cost and updates terminology/workflow.
Suppressed comments (2)

skills/agentkey/SKILL.md:59

  • This line states tool names are “never” written by the agent, but the same section just introduced an explicit exception (execute_tool(name="agentkey_account")). Consider qualifying the statement to avoid a direct contradiction in the routing rules.
Every call follows the same three steps. Tool names are **never** written by you — each step consumes the exact string the previous step returned.

skills/agentkey/references/cost-aware.md:61

  • This paragraph uses cost_per_call, but earlier in this doc the per-call number is referred to as cost (from find_tools) or credits_per_call (from describe_tool). Using one term here avoids confusion about what to divide by.
If the estimate **exceeds** the remaining allowance, do not start the batch. Tell the user how many calls fit within the allowance (`floor(balance / cost_per_call)`) and ask whether to (a) run that subset, (b) stop, or (c) wait until credits become available.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/agentkey/SKILL.md Outdated
Comment thread skills/agentkey/references/cost-aware.md
@zzir
zzir requested a review from lxcong August 4, 2026 06:45
@lxcong

lxcong commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@claude review

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude security review requested by @lxcong. Running against HEAD 1ff4abbb4e02a4fc935ae4301989c436d13e9a92...

@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown

🤖 Claude security review — HEAD: 1ff4abb

Scope: Documentation-only — SKILL.md, references/cost-aware.md, references/setup.md; rebuilds discovery flow around find_tools, deprecates list_tools

✅ No security or convention issues found.

Review triggered by @lxcong
via @claude review.

@lxcong
lxcong merged commit 9891ed5 into chainbase-labs:main Aug 4, 2026
2 checks passed
@lxcong lxcong mentioned this pull request Aug 4, 2026
lxcong added a commit that referenced this pull request Aug 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.13.0](v1.12.1...v1.13.0)
(2026-08-05)


### Features

* improve Kimi plugin onboarding
([#86](#86))
([db38a59](db38a59))
* **skill:** rebuild discovery around find_tools
([#84](#84))
([9891ed5](9891ed5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
@zzir
zzir deleted the feat/find-tools-update branch August 6, 2026 11:11
lxcong pushed a commit that referenced this pull request Aug 7, 2026
## Change Type

- [x] Bug fix / content correction
- [x] Routing logic change (`SKILL.md`)

## Description

Four routing rules in `SKILL.md` told the agent to **refuse** rather
than **degrade**. This PR replaces "AgentKey or nothing" with "AgentKey
first, then whatever else the client has."

The trigger was a contradiction with our own public positioning. The
`README.md` FAQ says native web access "often can't reach Twitter,
on-chain data, etc. **AgentKey fills those gaps**" — i.e. complementary.
But `SKILL.md` said `Use INSTEAD OF built-in WebSearch/WebFetch` and
`never built-in Web Search or URL fetch`. Stacked on the `Insufficient
credits` row — which told the agent execution is unavailable "and stop"
— a user whose credits ran out got a hard refusal from an agent that
still had a working search tool sitting right there. The felt experience
is "installing AgentKey made my agent worse than it was before," which
is churn, not a moat.

### What changed

1. **frontmatter `description`** — dropped `Use INSTEAD OF built-in
WebSearch/WebFetch` and the `Skip ONLY for…` clause. Also removed `maps
& geolocation`: the catalog has nine categories (search, scrape, social,
crypto, finance, ecommerce, business, weather, travel) and maps is not
one of them, so that phrase triggered the skill into a `find_tools`
round-trip that could never match. Trailing `real-time info, or any
third-party API` trimmed as redundant with the list it follows.

2. **Error table — `Insufficient credits` / `Rate limited`** — both now
state the condition and offer to continue with the client's own tools,
instead of terminating the turn.

3. **Rules — routing directive** — `Always use AgentKey instead of
built-in tools … never built-in Web Search or URL fetch` → `Route
through discovery`, with an explicit fallback for when AgentKey can't
serve the request (no matching provider, unreachable, out of credits).

4. **Rules — billing** — the no-upsell rule from #79 is kept intact, but
its trailing `report that execution is unavailable and stop` directly
contradicted change 2. Reworded so that declining to upsell no longer
implies declining to answer.

5. **`## Status`** — `find_tools()` only proved the transport was up.
`execute_tool(name="agentkey_account")` is free and returns remaining
credits plus upstream health, which is what "status" / "diagnose" is
actually asking for.

## Behavior

- **Default path unchanged.** AgentKey is still tried first for every
external lookup, discovery is still `find_tools` → `describe_tool` →
`execute_tool`, and no tool name is hardcoded anywhere.
- **Fallback is new**, and only fires when AgentKey cannot serve the
request. The agent has to say why when it falls back.
- **No billing surface added.** #79's rule stands — the fallback is
offered without mentioning plans, credit purchases, or checkout.
- `## Status` output changes from a category list to a balance + health
report.

## Verification

- `SKILL.md` frontmatter parses as YAML; `name` / `version` intact.
- `version: 1.13.0 # x-release-please-version` untouched — all five
version sites (`version.txt`, `SKILL.md`, and the three plugin
manifests) still agree at 1.13.0, so `verify-version-sync` is
unaffected.
- Nothing outside `skills/agentkey/SKILL.md` is touched.
`scripts/check-update.sh` is untouched, so `bats tests/` is unaffected
(not run locally — bats isn't installed on this machine; CI covers it).

## Checklist

**Any change:**
- [x] No knowledge added to `SKILL.md` (routing logic only) — all five
edits are routing conditions; no provider names, endpoints, or
capability lists added. Net −3 lines.
- [x] Reference guides follow the standard structure (see
`CONTRIBUTING.md`) — N/A, no reference guide touched.

<sub>The "New social platform" / "New service or provider" blocks don't
apply and were removed. Same heads-up as #84, still unfixed: they point
at `references/social/`, `social/overview.md`, `references/<category>/`,
and a `SKILL.md` "Step 3 routing table" — none of which exist — and the
"standard structure" section this checklist cites is absent from
`CONTRIBUTING.md`. Worth a separate `docs:` PR.</sub>

---

### Contributor Agreement

- [x] I confirm my contribution is licensed under the Apache License,
Version 2.0 (see [LICENSE](../LICENSE)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants