FrontMCP automatically wires up the Model Context Protocol discovery flows for every prompt or resource you register. Use these APIs to build picker UIs, hydrate autocomplete menus, or audit what your server is advertising.Documentation Index
Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prompt discovery
Callprompts/list to enumerate every prompt exposed by your server or its plugins:
name, FrontMCP prefixes the owner ID (ownerId:name) so clients can disambiguate the entries.
To fetch the actual message content, call prompts/get with the name returned by prompts/list plus any arguments:
GetPromptResult payload containing messages, optional description, and any inline attachments.
Resource discovery
Callresources/list to enumerate every static resource:
resources/read (or resources/subscribe) to stream the actual content.
Change notifications
FrontMCP lets clients react to live changes:notifications/prompts/list_changedfires whenever prompts are added or removed (adapters, hot reloads, plugin lifecycle).notifications/resources/list_changedfires when static resources or templates change.notifications/resources/updatedfires when a subscribed resource changes content (triggered viathis.notifyUpdated()orscope.resources.notifyContentChanged(uri)).
resources/subscribe with a uri to start receiving resources/updated notifications. Subscriptions work in-memory on single-server deployments (stdio, binary, single-instance HTTP) — no Redis required.
Error handling and best practices
- FrontMCP throws an
InvalidMethodErrorif you send the wrong method (for exampleprompts/listpayloads to the resource flow). - Arguments are validated with the same Zod schemas you declared on your prompts and resources; invalid inputs return structured errors before execution.
- Duplicate names are automatically namespaced, but it’s still best to keep names globally unique for a smoother UX.
- Include helpful
description,title, andiconsmetadata. Clients rely on that information to render menus, especially when the user cannot see raw IDs.