Skip to content

feat(nuxt-mcp-dev): add pagination and filtering for list-nuxt-components#46

Open
Jack-sh1 wants to merge 1 commit into
antfu:mainfrom
Jack-sh1:feat/list-components-pagination
Open

feat(nuxt-mcp-dev): add pagination and filtering for list-nuxt-components#46
Jack-sh1 wants to merge 1 commit into
antfu:mainfrom
Jack-sh1:feat/list-components-pagination

Conversation

@Jack-sh1
Copy link
Copy Markdown

🔗 Linked issue

Resolves #29

🔄 Context

With large Nuxt apps, list-nuxt-components can return responses that exceed MCP tool token limits (e.g. 31017 tokens > 25000 limit), making it unusable.

This PR adds optional page, pageSize, and filter parameters so clients can paginate through results and search by component name.

📚 Description

  • Added three optional parameters to list-nuxt-components:
    • filter — case-insensitive substring match against pascalName and kebabName
    • page — page number, starts from 1 (default: 1)
    • pageSize — items per page (default: 50, max: 200)
  • Response now includes a pagination object with page, pageSize, total, and totalPages, so AI models can determine whether to request more pages.
  • All parameters are optional, so this is fully backward-compatible — calling with no arguments returns the first 50 components with pagination metadata.

…ents

Large Nuxt apps may exceed MCP tool token limits when listing all
components at once. Add optional page, pageSize, and filter parameters
to allow clients to paginate through results and search by component name.

Closes antfu#29
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.

add pagination for list-nuxt-components

1 participant