Skip to content

MCP guideline tools return the homepage for components without guidance #8782

Closed

Description

@mattobee

Description

get_component_usage_guidelines and get_component_accessibility_guidelines return the primer.style homepage when a component has no guidelines page, and present it as that component's guidance because it returns 200 instead of 404. An agent can reasonably conclude it's read the guidance when there isn't any.

get_component isn't affected, so agents still get the overview, props and examples.

This isn't the id versus slug problem fixed in #8531 and #8561. The URLs are right, the pages just don't exist.

btw the usage guidelines tool's error message for 4xx responses says "accessibility guidelines". Looks like a copy-paste slip.

Steps to reproduce

  1. Call get_component_usage_guidelines with name: "Card".
  2. The response is labelled as Card guidance, but its content is the primer.style homepage.
  3. Open https://primer.style/product/components/card/guidelines and you land on https://primer.style/ with a 200, which is what the tool receives.
  4. Repeat with name: "Button", which has a guidelines page, and you get real guidance.

Version

@primer/mcp 1.1.2

Browser

No response

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

Metadata

Metadata

Labels

bugSomething isn't workingmcp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions