Skip to content

[WIP] feat(API): [PF-3167] Wire tools and resources to doc-core API#115

Draft
jpuzz0 wants to merge 1 commit intopatternfly:mainfrom
jpuzz0:PF-3167-pf-api-mcp-integration
Draft

[WIP] feat(API): [PF-3167] Wire tools and resources to doc-core API#115
jpuzz0 wants to merge 1 commit intopatternfly:mainfrom
jpuzz0:PF-3167-pf-api-mcp-integration

Conversation

@jpuzz0
Copy link

@jpuzz0 jpuzz0 commented Mar 3, 2026

Depends on patternfly/patternfly-doc-core#221

Summary

  • Tools and resources now fetch docs from the patternfly-doc-core API instead of using hardcoded data
  • Added api.client, api.fetcher, api.transforms, and api.types modules to handle the integration
  • If the API is unreachable, falls back to sitemap scraping — search and metadata still work, just no doc content

Testing

Ran a local test against doc-core locally running and a local version of this MCP with API integration against the published npm package in an empty repo, no additional context given - asked claude code the following prompt:

Write me a PatternFly Alert component in React that shows a warning when a VM migration is in progress. Include a dismiss action and a link to view migration details.

The results comparing the 2 outputs were as follows:

Metric Before (npm published) After (local API)  % Change
Tools called searchPatternFlyDocs, usePatternFlyDocs, componentSchemas (x3) usePatternFlyDocs  
Tool calls 5 1 -80%
Doc source GitHub raw markdown + JSON schemas doc-core API (markdown + props table)  
Token warning "~14.0k tokens, this can fill up context quickly" None  
Files written 2 (component + example) 1 (component)  
Lines generated 56 33 -41%
Cost $0.50 $0.35 -30%
API duration 41s 26s -37%
Wall duration 1m 39s 1m 33s -6%

Signed-off-by: Jeff Puzzo <jpuzzo@redhat.com>
@jpuzz0 jpuzz0 force-pushed the PF-3167-pf-api-mcp-integration branch from 0ac0b89 to 603ba54 Compare March 3, 2026 19:57
@jpuzz0 jpuzz0 marked this pull request as draft March 3, 2026 20:06
@jpuzz0 jpuzz0 changed the title [WIP] feat(API): [PF-3167] Wire tools and resources to doc-core API feat(API): [PF-3167] Wire tools and resources to doc-core API Mar 3, 2026
@jpuzz0 jpuzz0 changed the title feat(API): [PF-3167] Wire tools and resources to doc-core API [WIP] feat(API): [PF-3167] Wire tools and resources to doc-core API Mar 3, 2026
@cdcabrera
Copy link
Member

@jpuzz0 thank you for the concept work. reviewed your concept it's parallel to aspects of the work in progress. few things

  • this work is currently assigned
  • be careful of "model produced stats"
  • we may end up closing this PR in favor of the assigned effort

I encourage you to comment on the related issues instead, see #49

I've gone ahead and provided a related comment on #49 and linked to your fork/branch. If you're interested in contributing we can talk offline about tasks and stories that still need attention.

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.

2 participants