Skip to content

fix(member-directory): include tools_count and tools in discover-agent response#4261

Draft
bokelley wants to merge 2 commits intomainfrom
claude/issue-4256-member-directory-tools-count
Draft

fix(member-directory): include tools_count and tools in discover-agent response#4261
bokelley wants to merge 2 commits intomainfrom
claude/issue-4256-member-directory-tools-count

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 8, 2026

Closes #4256

Summary

The /api/public/discover-agent endpoint computed tools = agentInfo.tools || [] from a live agent probe but dropped it before serializing the JSON response. The member directory modal reads data.tools and data.tools_count from that response — since neither field was present, both always fell back to 0/[], showing "Tools: 0" regardless of the comply cache state.

The reporter's stale-comply-cache theory was incorrect. The page was already probing live; it just discarded the tool list before returning the response.

Changes:

  • registry-api.ts: strip tools to {name, description} (no inputSchema exposure on a public unauthenticated endpoint) and include tools_count: tools.length and tools in the response
  • registry-api.ts: update the OpenAPI schema for discoverAgent to declare the two new fields
  • members.html: change data.tools_count || tools.lengthdata.tools_count ?? tools.length so a genuine "0 tools" agent is displayed as 0 rather than triggering the fallback arm

Non-breaking justification: Adds two new fields (tools_count, tools) to an existing GET response. No existing consumer is broken — consumers that ignored those fields continue to work; the template that expected them now gets them.

Separate issue not fixed here: The comply re-runner not firing on schedule (related bug referenced in #4256). That's a distinct infra problem with no overlap in the diff.

Pre-PR review:

  • code-reviewer: approved — flagged inputSchema exposure (fixed by stripping to {name, description}) and missing OpenAPI schema update (fixed); ||?? nit addressed
  • internal-tools-strategist: approved — confirmed fix resolves both the counter display and the hidden tools list section; agentType !== 'buying' gate behaves correctly with the new field present

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_01RUBQkib3o3bktEosekm7LG


Generated by Claude Code

…t response

The /api/public/discover-agent endpoint computed the tool list from a live
agent probe but dropped it before serializing the response. The member
directory modal reads data.tools and data.tools_count from that response,
so both always resolved to 0/[]. Tools are stripped to {name, description}
before serialization; inputSchema is not exposed on the public endpoint.
OpenAPI schema updated to match.

Closes #4256

Session: https://claude.ai/code/session_01RUBQkib3o3bktEosekm7LG
@bokelley bokelley added the claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage. label May 8, 2026
Generated by npm run build during triage session. Includes member-agents
schema updates (MemberAgentTypeInput split, type required on write path)
and new onboarding-openapi surface that was missing from dist.

Session: https://claude.ai/code/session_01RUBQkib3o3bktEosekm7LG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Member directory agent card shows 0 tools due to stale comply cache

2 participants