Skip to content

Commit f9fcac9

Browse files
authored
Merge pull request #14 from event-catalog/added-owners
feat(core): added owners tools
2 parents 03b0eb5 + 97e71fb commit f9fcac9

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

.changeset/thirty-cycles-wait.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@eventcatalog/mcp-server": patch
3+
---
4+
5+
feat(core): added owners tools

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ Here is a list of all the APIs that the MCP server supports.
138138
- Reviews schema changes for breaking changes and suggests fixes.
139139
- `explain_ubiquitous_language_terms`
140140
- Explain ubiquitous language terms for a given domain
141+
- `find_owners`
142+
- Find owners (teams or users) for a domain, services, messages, events, commands, queries, flows or entities in EventCatalog
143+
141144

142145
## Resources
143146

src/tools/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export const TOOL_DEFINITIONS = [
7373
'- If the resource has a domain, include it in the response',
7474
'- Ask the user if they would like more information about a specific resource',
7575
'- When you return a message, in brackets let me know if its a query, command or event',
76+
`- If you are returning a flow (state machine) try and return the result in mermaid to the user, visualizing how the business logic flows`,
7677
`- If you return any URLS make sure to include the host URL ${process.env.EVENTCATALOG_URL}`,
7778
].join('\n'),
7879
paramsSchema: {
@@ -83,6 +84,22 @@ export const TOOL_DEFINITIONS = [
8384
.describe('The type of resource to find'),
8485
},
8586
},
87+
{
88+
name: 'find_owners' as const,
89+
description: [
90+
'Find owners (teams or users) for a domain, services, messages, events, commands, queries, flows or entities in EventCatalog',
91+
'Use this tool when you need to:',
92+
'- Find owners (teams or users) for a domain, services, messages, events, commands, queries, flows or entities in EventCatalog',
93+
'- A resource in eventcatalog can have owners, use that id to find the owners',
94+
'- Return everything you know about the owners',
95+
'- When you find owners the url would look something like /docs/users/{id} if its a user or /docs/teams/{id} if its a team',
96+
'- When you return owners make sure they include the url to the documentation',
97+
`- If you return any URLS make sure to include the host URL ${process.env.EVENTCATALOG_URL}`,
98+
].join('\n'),
99+
paramsSchema: {
100+
id: z.string().trim().describe('The id of the owner (user or team) to find'),
101+
},
102+
},
86103
{
87104
name: 'explain_ubiquitous_language_terms' as const,
88105
description: [
@@ -187,6 +204,12 @@ const handlers = {
187204
content: [{ type: 'text', text: text }],
188205
};
189206
},
207+
find_owners: async (params: any) => {
208+
const text = await getEventCatalogResources();
209+
return {
210+
content: [{ type: 'text', text: text }],
211+
};
212+
},
190213
};
191214

192215
export function registerTools(server: McpServer) {

0 commit comments

Comments
 (0)