Add getPeople

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-11-20 19:23:40 +01:00
parent 85b7c1cd7b
commit deb656d95e
4 changed files with 61 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ type ResolverInterface interface {
ListPeopleTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListPeopleInput) (*mcp.CallToolResult, types.ListPeopleOutput, error)
AddVendorTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddVendorInput) (*mcp.CallToolResult, types.AddVendorOutput, error)
UpdateVendorTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateVendorInput) (*mcp.CallToolResult, types.UpdateVendorOutput, error)
GetPeopleTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetPeopleInput) (*mcp.CallToolResult, types.GetPeopleOutput, error)
}
// New creates a new MCP server instance with all handlers registered.
@@ -84,4 +85,14 @@ func registerToolHandlers(server *mcp.Server, resolver ResolverInterface) {
},
resolver.UpdateVendorTool,
)
mcp.AddTool(
server,
&mcp.Tool{
Name: "getPeople",
Description: "Get a people by ID",
InputSchema: types.GetPeopleToolInputSchema,
OutputSchema: types.GetPeopleToolOutputSchema,
},
resolver.GetPeopleTool,
)
}