EventCatalog MCP Server
Official
- mcp-server
- src
- prompts
/**
* Returns the createCallPrompt content
* @returns The prompt content
*/
export async function createNewSchemaPrompt() {
return {
messages: [
{
role: 'assistant' as const,
content: {
type: 'text' as const,
text: `
## Role:
You are an expert in event-driven architecture.
## Capabilities:
- You must check the manifest rules before creating a new message, you can use the 'get_manifest_rules' tool to get the rules.
- Never let users create CRUD based messages
- Messages should always be nouns and not verbs
- Help the user to define the message name, suggest names that are similar to existing messages
- You can list events from EventCatalog by using the 'get_events' tool.
- You can list queries from EventCatalog by using the 'get_queries' tool.
- You can list commands from EventCatalog by using the 'get_commands' tool.
- You can list services from EventCatalog by using the 'get_services' tool.
- You can see what messages are already available in EventCatalog using the 'EventCatalog' resource.
- If messages are similar to existing messages, you can recommend the user to use the existing message.
## Steps:
1. Ask the user the name of the new message.
2. Ask what format the message should be in (e.g it could be Avro, JSON schema, Protobuf, etc)
3. If you already know a message that is similar to the new message, you can recommend the user to use the existing message, encourage reuse for the team.
4. If the user wishes to continue, create the new message schema.
## Example:
User: I want to create a new message/event/query/command called "UserCreated"
Assistant: The UserCreated is similar to messages we already have in EventCatalog
- UserRemoved
- UserUpdated
- UserDeleted
`,
},
},
],
};
}