Skip to content

Document searching and describing app APIs by method - #298

Draft
tnkuehne wants to merge 1 commit into
mainfrom
docs/method-describe
Draft

tnkuehne wants to merge 1 commit into
mainfrom
docs/method-describe

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Documents the method-level search and describe MCP tools and widefleet services describe --entrypoint … --method ….

Implementation: #297 and #303 (stacked on #290). This documentation describes unreleased behavior and stays in draft until a release includes #290, #297 and #303.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs a3594c8 Nov 22 2026, 05:02 PM

@tnkuehne
tnkuehne force-pushed the docs/method-describe branch from 5001421 to 013c59f Compare November 22, 2026 15:01
@tnkuehne
tnkuehne force-pushed the docs/method-describe branch 2 times, most recently from afb2c3d to d42b3b4 Compare November 22, 2026 15:08
@tnkuehne
tnkuehne force-pushed the docs/method-describe branch 2 times, most recently from 4008f90 to c1f1432 Compare November 22, 2026 16:03
@tnkuehne
tnkuehne removed this pull request from stack #299 November 22, 2026 16:03
@tnkuehne
tnkuehne changed the base branch from feat/method-describe to feat/exact-type-references November 22, 2026 16:03
@tnkuehne
tnkuehne added this pull request to stack #304 November 22, 2026 16:03
@tnkuehne
tnkuehne force-pushed the docs/method-describe branch 2 times, most recently from 38a17ed to 21be025 Compare November 22, 2026 16:14
Base automatically changed from feat/exact-type-references to main November 22, 2026 16:57
tnkuehne added a commit that referenced this pull request Nov 22, 2026
## Why

With #290 an app can publish documentation for large APIs (hundreds of
methods, thousands of types). MCP `describe` and `widefleet services
describe` still returned an entrypoint's whole document with every type,
which floods an agent's context before it calls anything.

## What changes

**MCP**
- `search` returns **methods**: hostname, entrypoint, method and the
first line of its summary, best matches first. `hostname` and
`entrypoint` filters narrow a query or, without words, list every method
of a service. They replace the former "exact hostname as query" rule.
- `describe` takes `methods` (1–20) and returns the entrypoint's
documentation with only those methods, plus the types their signatures
use, directly or through other types.
- The service index stores one entry per method (format 2). Indexes of
the earlier format are rebuilt like expired ones. Entrypoints without
documented methods are not listed, since `call` only reaches methods.

**API and CLI**
- `GET /app-services/{service}` returns `documented`, the list of
methods with summaries, and `documentation: null`. With `entrypoint` and
`methods` (comma-separated), `documentation` holds the selected methods
and their types.
- `widefleet services describe APP [--entrypoint NAME] [--method NAME]…`
- The API reference page in the control plane keeps the complete
documentation (`connections.reference`).

Selecting methods and their types is shared contract logic
(`selectServiceMethods`, `listServiceMethods`), used by the runtime and
the control plane.

## Verification

- `pnpm check`
- `pnpm exec vitest run` (all suites)
- `RUN_SERVICE_TESTS=1 pnpm exec vitest run
apps/control-plane/tests/app-services-runtime.test.ts` (workerd and
celld)
- `RUN_CLOUDFLARE_TESTS=1 pnpm exec vitest run
apps/control-plane/tests/cloudflare`
- `RUN_CLI_TESTS=1 pnpm exec vitest run
apps/control-plane/tests/app-services-cli.test.ts
apps/control-plane/tests/service-documentation.test.ts` with a freshly
built CLI
- `pnpm exec playwright test tests/e2e/auth.spec.ts`
- `bash tools/cargo.sh clippy -p platform-cli --all-targets -- -D
warnings`, `fmt --all --check`


Documentation: #298 (draft until a release includes #290 and this PR).








<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=115781343&amp;sig=ba35fdbf0170c98e3c6618b2f7aae8f198a6e4dd455c4745161612814adb2ebf"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F297&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge, with the
documentation updates supplied by PR #298.

<details open><summary><h3>Summary</h3></summary>

Changes API discovery from whole services to individual methods.
- MCP search returns matching app methods.
- MCP describe returns documentation for selected methods.
- The API and CLI list methods and describe selected ones.

No new actionable issues were found. Tests were inspected, not run.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Published API documentation] --> B[Method index]
  B --> C[MCP search]
  A --> D[selectServiceMethods]
  D --> E[MCP describe]
  D --> F[HTTP and CLI selected descriptions]
  A --> G[Complete reference page]
```
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (4) · Last reviewed commit: ["Match type names only as
whole
names"](1701c54)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
@tnkuehne
tnkuehne force-pushed the docs/method-describe branch 2 times, most recently from 28706a3 to a3594c8 Compare November 22, 2026 16:58
@jonathanlaib jonathanlaib added the documentation Improvements or additions to documentation label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants