forcedotcom / forcedotcom/mcp-hosted
[Bug]: headless-360 discover with resultType "endpoint" returns only workflow results, never endpoints
- Dominant language
- No language data
- Stars
- 135
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
`discover` accepts a `resultType` of `endpoint`, but every result it returns is a workflow (`sor_type: "workflow"`). No endpoint-kind result has ever come back, across 18 themed queries on two separate dates.
### Environment
Production org (Enterprise Edition), API v67. Client: Claude Code via a pre-registered External Client App (public client, PKCE, `mcp_api` scope). Server reports `headless-360 1.0.0`. Observed 2026-08-22 across 18 `discover` queries, re-confirmed 2026-08-28.
### Detail
16 themed queries on 2026-08-22 surfaced 192 distinct multi-step recipes and zero individual endpoints. Re-running three of those queries verbatim on 2026-08-28 (MCP registry, SOQL-as-endpoint, user management) returned the same counts with shifted id sets, and still no endpoint-kind results. Setting `resultType: "endpoint"` explicitly does not change the kind of result returned; it appears only to filter, and on the endpoint-filtered query the newly added top-level `filtered_out_count` came back as 3 while the surviving results were still all workflows.
### Why this matters
`discover` reads as an index over the platform's operations, and `resultType: "endpoint"` reads as the way to find a specific API rather than a multi-step recipe. In practice it is a recipe library only. An agent looking for "the endpoint that does X" gets a 50-step onboarding workflow instead, then either follows the whole recipe or gives up. The recipes themselves are genuinely good, so this is about discoverability, not quality.
### Suggested resolution
Either return endpoint-kind results for `resultType: "endpoint"`, or drop the parameter and say plainly in the tool description that `discover` indexes recipes rather than individual endpoints.
Contributor guide
Research direction
Start at the discover entry point and reproduce the reported queries with resultType set to "endpoint," checking whether returned results have sor_type "endpoint" or "workflow." Done means the parameter either returns endpoint-kind results as described, or its behavior and purpose are made explicit in the tool description; the payload names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100