Skip to content

chore: sync dx-toolkit packages with hosted tool surface (balance, discover) - #91

Merged
EdwardIrby merged 7 commits into
mainfrom
chore/mcp-sync-hosted-tools
Jul 23, 2026
Merged

chore: sync dx-toolkit packages with hosted tool surface (balance, discover)#91
EdwardIrby merged 7 commits into
mainfrom
chore/mcp-sync-hosted-tools

Conversation

@EdwardIrby

@EdwardIrby EdwardIrby commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

Syncs the dx-toolkit packages with the current hosted You.com MCP tool surface, which has added you-balance and you-discover. Source of truth: youdotcom-mcp-server/src/tools.ts.

Changes by package

mcp (docs)

  • README capability surface and default set updated to include you-balance and you-discover.
  • you-finance documented as the non-default tool; you-eco intentionally not advertised.

cli (code, required)

  • Regenerated TOOL_CONTRACT (src/tools.ts) via scripts/update-cli-tools.ts to add you-balance and you-discover. The CLI gates schema/execute/help on this contract, so both are required for the CLI to invoke them.
  • surfaceVersion bumped to 2026.07.23; new contractHash.
  • Updated the hardcoded contract assertion in cli.spec.ts.

api (code, typed DX)

  • Added you-balance to the generator allowlist (scripts/update-api-schemas.ts knownTools) and regenerated packages/api/src/tool-schemas.ts against the live server.
  • YouBalanceInput (Record<string, unknown>) and YouBalanceOutput ({ data: { attributes: { balance: number }, id, type } }) now exported from main.ts.
  • Extended the renderApiSchemas fixture/assertions in scripts/tests/update-api-schemas.spec.ts.
  • you-discover intentionally not typed (its value is dynamic external results; the API client already handles any tool via the generic call/schema/tools).

langchain + ai-sdk-plugin (docs)

  • READMEs' default hosted tool set synced to add you-balance and you-discover. Both packages are tool-agnostic passthroughs; no code changes.

Notes

  • No version bumps or server.json changes (CI/publish workflow manages versions; server.json is tool-agnostic).
  • eco is not advertised anywhere.

Validation

  • bun --cwd packages/{cli,api,langchain,ai-sdk-plugin,mcp} check all pass.
  • bun --cwd packages/cli test (26 pass), bun --cwd packages/api test (10 pass).
  • bun test scripts/tests/update-cli-tools.spec.ts scripts/tests/update-api-schemas.spec.ts (4 pass).

…scover)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@EdwardIrby
EdwardIrby requested a review from a team as a code owner July 23, 2026 07:02
@factory-droid

factory-droid Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Droid finished @EdwardIrby's task —— View job


Droid review complete. Clean docs-only PR that syncs the MCP README tool surface with the hosted server, adding you-eco, you-balance, and you-discover and updating the default/non-default categorization. No findings to flag.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@factory-droid

factory-droid Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Droid finished @EdwardIrby's task —— View job


Droid review complete. Clean docs-only PR that syncs the MCP README tool surface with the hosted server. The capability surface (7 tools), default tool set (5 tools), and profile=free note are all internally consistent after the two commits (add eco/balance/discover, then drop eco). No code, dependency, or security changes. No findings to flag.

EdwardIrby and others added 3 commits July 23, 2026 00:26
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@EdwardIrby EdwardIrby changed the title docs(mcp): sync hosted tool surface with server chore: sync dx-toolkit packages with hosted tool surface (balance, discover) Jul 23, 2026
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@EdwardIrby EdwardIrby closed this Jul 23, 2026
@EdwardIrby EdwardIrby reopened this Jul 23, 2026
@factory-droid

factory-droid Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Droid finished @EdwardIrby's task —— View job


Droid is reviewing code and running a security check…


Review complete. The PR correctly syncs the hosted tool surface across packages, adding you-balance and you-discover to generated contracts, typed schemas, and most documentation. Two README code examples that claim to show "the default tools plus finance" still list the old four-tool array and are missing you-balance and you-discover, which means users following those examples would silently lose two default tools.

```

`createYouClient()` returns the underlying MCP client. Call `await client.tools()` to resolve the default hosted tool set (`you-search`, `you-research`, and `you-contents`) unless you scope it with `tools`, and call `await client.close()` when finished.
`createYouClient()` returns the underlying MCP client. Call `await client.tools()` to resolve the default hosted tool set (`you-search`, `you-contents`, `you-research`, `you-balance`, and `you-discover`) unless you scope it with `tools`, and call `await client.close()` when finished.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] "Default tools plus finance" code example is missing you-balance and you-discover

This line now defines the default tool set as you-search, you-contents, you-research, you-balance, and you-discover, but the code example around line 188 (tools: ['you-search', 'you-research', 'you-contents', 'you-finance']) was not updated to include the two new default tools. Users following that "If you want the default tools plus finance" example would inadvertently drop you-balance and you-discover from their tool set.

```

`createYouClient()` returns the underlying MCP client. Call `await client.getTools()` to resolve the default hosted tool set (`you-search`, `you-research`, and `you-contents`) unless you scope it with `tools`, and call `await client.close()` when finished.
`createYouClient()` returns the underlying MCP client. Call `await client.getTools()` to resolve the default hosted tool set (`you-search`, `you-contents`, `you-research`, `you-balance`, and `you-discover`) unless you scope it with `tools`, and call `await client.close()` when finished.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] "Default tools plus finance" code example is missing you-balance and you-discover

This line now defines the default tool set as you-search, you-contents, you-research, you-balance, and you-discover, but the code example around line 183 (tools: ['you-search', 'you-research', 'you-contents', 'you-finance']) was not updated to include the two new default tools. Users following that "If you want the default tools plus finance" example would inadvertently drop you-balance and you-discover from their tool set.

…t-plus-finance example

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@factory-droid

factory-droid Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Droid finished @EdwardIrby's task —— View job


Droid review complete. Clean sync PR that adds you-balance and you-discover to generated CLI contracts, typed API schemas, and all README documentation. The previously flagged issues (code examples missing the new default tools) were already addressed in this commit. No new correctness or security findings.

@EdwardIrby

Copy link
Copy Markdown
Member Author

Fixed in fef84a7. Both the langchain and ai-sdk-plugin "default tools plus finance" examples now list the full default set plus finance: ['you-search', 'you-contents', 'you-research', 'you-balance', 'you-discover', 'you-finance'].

@EdwardIrby
EdwardIrby merged commit efacbf0 into main Jul 23, 2026
3 checks passed
@EdwardIrby
EdwardIrby deleted the chore/mcp-sync-hosted-tools branch July 23, 2026 09:09
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.

1 participant