@@ -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
192215export function registerTools ( server : McpServer ) {
0 commit comments