From 8f73e37143e9ec33c871940070866a52d04b591a Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Mon, 16 Feb 2026 13:51:28 +0100 Subject: [PATCH] Add meetings to mcp Signed-off-by: Sacha Al Himdani --- pkg/server/api/mcp/v1/schema.resolvers.go | 104 ++++++++++ pkg/server/api/mcp/v1/server/server.go | 66 ++++++ pkg/server/api/mcp/v1/specification.yaml | 239 ++++++++++++++++++++++ pkg/server/api/mcp/v1/types/meeting.go | 49 +++++ pkg/server/api/mcp/v1/types/types.go | 115 +++++++++++ 5 files changed, 573 insertions(+) create mode 100644 pkg/server/api/mcp/v1/types/meeting.go diff --git a/pkg/server/api/mcp/v1/schema.resolvers.go b/pkg/server/api/mcp/v1/schema.resolvers.go index 76bda1c62..794ec13ba 100644 --- a/pkg/server/api/mcp/v1/schema.resolvers.go +++ b/pkg/server/api/mcp/v1/schema.resolvers.go @@ -1837,3 +1837,107 @@ func (r *Resolver) GetProfileTool(ctx context.Context, req *mcp.CallToolRequest, func (r *Resolver) UpdateProfileTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateProfileInput) (*mcp.CallToolResult, types.UpdateProfileOutput, error) { return nil, types.UpdateProfileOutput{}, fmt.Errorf("updateProfile not implemented") } + +func (r *Resolver) ListMeetingsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListMeetingsInput) (*mcp.CallToolResult, types.ListMeetingsOutput, error) { + r.MustAuthorize(ctx, input.OrganizationID, probo.ActionMeetingList) + + prb := r.ProboService(ctx, input.OrganizationID) + + pageOrderBy := page.OrderBy[coredata.MeetingOrderField]{ + Field: coredata.MeetingOrderFieldCreatedAt, + Direction: page.OrderDirectionDesc, + } + if input.OrderBy != nil { + pageOrderBy = page.OrderBy[coredata.MeetingOrderField]{ + Field: input.OrderBy.Field, + Direction: input.OrderBy.Direction, + } + } + + cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy) + + page, err := prb.Meetings.ListForOrganizationID(ctx, input.OrganizationID, cursor) + if err != nil { + panic(fmt.Errorf("cannot list organization meetings: %w", err)) + } + + return nil, types.NewListMeetingsOutput(page), nil +} + +func (r *Resolver) GetMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetMeetingInput) (*mcp.CallToolResult, types.GetMeetingOutput, error) { + r.MustAuthorize(ctx, input.ID, probo.ActionMeetingGet) + + prb := r.ProboService(ctx, input.ID) + + meeting, err := prb.Meetings.Get(ctx, input.ID) + if err != nil { + return nil, types.GetMeetingOutput{}, fmt.Errorf("failed to get meeting: %w", err) + } + + return nil, types.GetMeetingOutput{ + Meeting: types.NewMeeting(meeting), + }, nil +} + +func (r *Resolver) AddMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddMeetingInput) (*mcp.CallToolResult, types.AddMeetingOutput, error) { + r.MustAuthorize(ctx, input.OrganizationID, probo.ActionMeetingCreate) + + svc := r.ProboService(ctx, input.OrganizationID) + + meeting, err := svc.Meetings.Create( + ctx, + probo.CreateMeetingRequest{ + OrganizationID: input.OrganizationID, + Name: input.Name, + Date: input.Date, + AttendeeIDs: input.AttendeeIds, + Minutes: input.Minutes, + }, + ) + if err != nil { + return nil, types.AddMeetingOutput{}, fmt.Errorf("failed to create meeting: %w", err) + } + + return nil, types.AddMeetingOutput{ + Meeting: types.NewMeeting(meeting), + }, nil +} + +func (r *Resolver) UpdateMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateMeetingInput) (*mcp.CallToolResult, types.UpdateMeetingOutput, error) { + r.MustAuthorize(ctx, input.ID, probo.ActionMeetingUpdate) + + svc := r.ProboService(ctx, input.ID) + + meeting, err := svc.Meetings.Update( + ctx, + probo.UpdateMeetingRequest{ + MeetingID: input.ID, + Name: input.Name, + Date: input.Date, + AttendeeIDs: input.AttendeeIds, + Minutes: UnwrapOmittable(input.Minutes), + }, + ) + if err != nil { + return nil, types.UpdateMeetingOutput{}, fmt.Errorf("failed to update meeting: %w", err) + } + + return nil, types.UpdateMeetingOutput{ + Meeting: types.NewMeeting(meeting), + }, nil +} + +func (r *Resolver) DeleteMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteMeetingInput) (*mcp.CallToolResult, types.DeleteMeetingOutput, error) { + r.MustAuthorize(ctx, input.ID, probo.ActionMeetingDelete) + + svc := r.ProboService(ctx, input.ID) + + err := svc.Meetings.Delete(ctx, input.ID) + if err != nil { + return nil, types.DeleteMeetingOutput{}, fmt.Errorf("failed to delete meeting: %w", err) + } + + return nil, types.DeleteMeetingOutput{ + DeletedMeetingID: input.ID, + }, nil +} diff --git a/pkg/server/api/mcp/v1/server/server.go b/pkg/server/api/mcp/v1/server/server.go index fcc6ea3cc..e71a569e3 100644 --- a/pkg/server/api/mcp/v1/server/server.go +++ b/pkg/server/api/mcp/v1/server/server.go @@ -89,6 +89,11 @@ type ResolverInterface interface { GetDocumentVersionSignatureTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetDocumentVersionSignatureInput) (*mcp.CallToolResult, types.GetDocumentVersionSignatureOutput, error) RequestDocumentVersionSignatureTool(ctx context.Context, req *mcp.CallToolRequest, input *types.RequestDocumentVersionSignatureInput) (*mcp.CallToolResult, types.RequestDocumentVersionSignatureOutput, error) CancelSignatureRequestTool(ctx context.Context, req *mcp.CallToolRequest, input *types.CancelSignatureRequestInput) (*mcp.CallToolResult, types.CancelSignatureRequestOutput, error) + ListMeetingsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListMeetingsInput) (*mcp.CallToolResult, types.ListMeetingsOutput, error) + GetMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetMeetingInput) (*mcp.CallToolResult, types.GetMeetingOutput, error) + AddMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddMeetingInput) (*mcp.CallToolResult, types.AddMeetingOutput, error) + UpdateMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateMeetingInput) (*mcp.CallToolResult, types.UpdateMeetingOutput, error) + DeleteMeetingTool(ctx context.Context, req *mcp.CallToolRequest, input *types.DeleteMeetingInput) (*mcp.CallToolResult, types.DeleteMeetingOutput, error) } // New creates a new MCP server instance with all handlers registered. @@ -1040,6 +1045,67 @@ func registerToolHandlers(server *mcp.Server, resolver ResolverInterface) { }, resolver.CancelSignatureRequestTool, ) + mcp.AddTool( + server, + &mcp.Tool{ + Name: "listMeetings", + Description: "List all meetings for the organization", + InputSchema: types.ListMeetingsToolInputSchema, + OutputSchema: types.ListMeetingsToolOutputSchema, + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + IdempotentHint: true, + }, + }, + resolver.ListMeetingsTool, + ) + mcp.AddTool( + server, + &mcp.Tool{ + Name: "getMeeting", + Description: "Get a meeting by ID", + InputSchema: types.GetMeetingToolInputSchema, + OutputSchema: types.GetMeetingToolOutputSchema, + Annotations: &mcp.ToolAnnotations{ + ReadOnlyHint: true, + IdempotentHint: true, + }, + }, + resolver.GetMeetingTool, + ) + mcp.AddTool( + server, + &mcp.Tool{ + Name: "addMeeting", + Description: "Add a new meeting to the organization", + InputSchema: types.AddMeetingToolInputSchema, + OutputSchema: types.AddMeetingToolOutputSchema, + }, + resolver.AddMeetingTool, + ) + mcp.AddTool( + server, + &mcp.Tool{ + Name: "updateMeeting", + Description: "Update an existing meeting", + InputSchema: types.UpdateMeetingToolInputSchema, + OutputSchema: types.UpdateMeetingToolOutputSchema, + }, + resolver.UpdateMeetingTool, + ) + mcp.AddTool( + server, + &mcp.Tool{ + Name: "deleteMeeting", + Description: "Delete a meeting", + InputSchema: types.DeleteMeetingToolInputSchema, + OutputSchema: types.DeleteMeetingToolOutputSchema, + Annotations: &mcp.ToolAnnotations{ + DestructiveHint: boolPtr(true), + }, + }, + resolver.DeleteMeetingTool, + ) } func boolPtr(b bool) *bool { diff --git a/pkg/server/api/mcp/v1/specification.yaml b/pkg/server/api/mcp/v1/specification.yaml index 5433095f9..8e7901306 100644 --- a/pkg/server/api/mcp/v1/specification.yaml +++ b/pkg/server/api/mcp/v1/specification.yaml @@ -4140,6 +4140,202 @@ components: $ref: "#/components/schemas/GID" description: Deleted document version signature ID + MeetingOrderField: + type: string + enum: + - CREATED_AT + - DATE + - NAME + go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.MeetingOrderField + + MeetingOrderBy: + type: object + required: + - field + - direction + properties: + field: + $ref: "#/components/schemas/MeetingOrderField" + description: Meeting order field + direction: + $ref: "#/components/schemas/OrderDirection" + description: Meeting order direction + + Meeting: + type: object + required: + - id + - name + - date + - created_at + - updated_at + properties: + id: + $ref: "#/components/schemas/GID" + description: Meeting ID + name: + type: string + description: Meeting name + date: + type: string + format: date-time + description: Meeting date + minutes: + anyOf: + - type: string + description: Meeting minutes + - type: "null" + description: No minutes + description: Meeting minutes + created_at: + type: string + format: date-time + description: Creation timestamp + updated_at: + type: string + format: date-time + description: Update timestamp + + ListMeetingsInput: + type: object + required: + - organization_id + properties: + organization_id: + $ref: "#/components/schemas/GID" + description: Organization ID + order_by: + $ref: "#/components/schemas/MeetingOrderBy" + description: Meeting order by + size: + type: integer + description: Page size + cursor: + $ref: "#/components/schemas/CursorKey" + description: Page cursor + + ListMeetingsOutput: + type: object + required: + - meetings + properties: + meetings: + type: array + items: + $ref: "#/components/schemas/Meeting" + description: List of meetings + next_cursor: + anyOf: + - $ref: "#/components/schemas/CursorKey" + - type: "null" + description: Next page cursor + + GetMeetingInput: + type: object + required: + - id + properties: + id: + $ref: "#/components/schemas/GID" + description: Meeting ID + + GetMeetingOutput: + type: object + required: + - meeting + properties: + meeting: + $ref: "#/components/schemas/Meeting" + + AddMeetingInput: + type: object + required: + - organization_id + - name + - date + properties: + organization_id: + $ref: "#/components/schemas/GID" + description: Organization ID + name: + type: string + description: Meeting name + date: + type: string + format: date-time + description: Meeting date + attendee_ids: + type: array + items: + $ref: "#/components/schemas/GID" + description: List of attendee profile IDs + minutes: + anyOf: + - type: string + description: Meeting minutes + - type: "null" + description: No minutes + description: Meeting minutes + + AddMeetingOutput: + type: object + required: + - meeting + properties: + meeting: + $ref: "#/components/schemas/Meeting" + + UpdateMeetingInput: + type: object + required: + - id + properties: + id: + $ref: "#/components/schemas/GID" + description: Meeting ID + name: + type: string + description: Meeting name + date: + type: string + format: date-time + description: Meeting date + attendee_ids: + type: array + items: + $ref: "#/components/schemas/GID" + description: List of attendee profile IDs + minutes: + type: ["string", "null"] + description: Meeting minutes + go.probo.inc/mcpgen/omittable: true + + UpdateMeetingOutput: + type: object + required: + - meeting + properties: + meeting: + $ref: "#/components/schemas/Meeting" + + DeleteMeetingInput: + type: object + required: + - id + properties: + id: + $ref: "#/components/schemas/GID" + description: Meeting ID + + DeleteMeetingOutput: + type: object + required: + - deleted_meeting_id + properties: + deleted_meeting_id: + $ref: "#/components/schemas/GID" + description: Deleted meeting ID + tools: - name: listOrganizations description: List all organizations the user has access to @@ -4809,3 +5005,46 @@ tools: $ref: "#/components/schemas/CancelSignatureRequestInput" outputSchema: $ref: "#/components/schemas/CancelSignatureRequestOutput" + - name: listMeetings + description: List all meetings for the organization + hints: + readonly: true + idempotent: true + inputSchema: + $ref: "#/components/schemas/ListMeetingsInput" + outputSchema: + $ref: "#/components/schemas/ListMeetingsOutput" + - name: getMeeting + description: Get a meeting by ID + hints: + readonly: true + idempotent: true + inputSchema: + $ref: "#/components/schemas/GetMeetingInput" + outputSchema: + $ref: "#/components/schemas/GetMeetingOutput" + - name: addMeeting + description: Add a new meeting to the organization + hints: + readonly: false + inputSchema: + $ref: "#/components/schemas/AddMeetingInput" + outputSchema: + $ref: "#/components/schemas/AddMeetingOutput" + - name: updateMeeting + description: Update an existing meeting + hints: + readonly: false + inputSchema: + $ref: "#/components/schemas/UpdateMeetingInput" + outputSchema: + $ref: "#/components/schemas/UpdateMeetingOutput" + - name: deleteMeeting + description: Delete a meeting + hints: + readonly: false + destructive: true + inputSchema: + $ref: "#/components/schemas/DeleteMeetingInput" + outputSchema: + $ref: "#/components/schemas/DeleteMeetingOutput" diff --git a/pkg/server/api/mcp/v1/types/meeting.go b/pkg/server/api/mcp/v1/types/meeting.go new file mode 100644 index 000000000..e1694fa9a --- /dev/null +++ b/pkg/server/api/mcp/v1/types/meeting.go @@ -0,0 +1,49 @@ +// Copyright (c) 2025 Probo Inc . +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +package types + +import ( + "go.probo.inc/probo/pkg/coredata" + "go.probo.inc/probo/pkg/page" +) + +func NewMeeting(m *coredata.Meeting) *Meeting { + return &Meeting{ + ID: m.ID, + Name: m.Name, + Date: m.Date, + Minutes: m.Minutes, + CreatedAt: m.CreatedAt, + UpdatedAt: m.UpdatedAt, + } +} + +func NewListMeetingsOutput(meetingPage *page.Page[*coredata.Meeting, coredata.MeetingOrderField]) ListMeetingsOutput { + meetings := make([]*Meeting, 0, len(meetingPage.Data)) + for _, v := range meetingPage.Data { + meetings = append(meetings, NewMeeting(v)) + } + + var nextCursor *page.CursorKey + if len(meetingPage.Data) > 0 { + cursorKey := meetingPage.Data[len(meetingPage.Data)-1].CursorKey(meetingPage.Cursor.OrderBy.Field) + nextCursor = &cursorKey + } + + return ListMeetingsOutput{ + NextCursor: nextCursor, + Meetings: meetings, + } +} diff --git a/pkg/server/api/mcp/v1/types/types.go b/pkg/server/api/mcp/v1/types/types.go index 0e90042f9..d8d72af20 100644 --- a/pkg/server/api/mcp/v1/types/types.go +++ b/pkg/server/api/mcp/v1/types/types.go @@ -31,6 +31,8 @@ var ( AddFrameworkToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"framework":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Framework description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Framework name"},"organization_id":{"type":"string","format":"string"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","name","created_at","updated_at"]}},"required":["framework"]}`) AddMeasureToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"category":{"type":"string","description":"Measure category"},"description":{"type":"string","description":"Measure description"},"name":{"type":"string","description":"Measure name"},"organization_id":{"type":"string","format":"string"}},"required":["organization_id","name","category"]}`) AddMeasureToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"measure":{"type":"object","properties":{"category":{"type":"string","description":"Measure category"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Measure description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Measure name"},"state":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","NOT_APPLICABLE","IMPLEMENTED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","category","name","state","created_at","updated_at"]}},"required":["measure"]}`) + AddMeetingToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"attendee_ids":{"type":"array","items":{"type":"string","format":"string"},"description":"List of attendee profile IDs"},"date":{"type":"string","description":"Meeting date","format":"date-time"},"minutes":{"description":"Meeting minutes","anyOf":[{"type":"string","description":"Meeting minutes"},{"type":"null","description":"No minutes"}]},"name":{"type":"string","description":"Meeting name"},"organization_id":{"type":"string","format":"string"}},"required":["organization_id","name","date"]}`) + AddMeetingToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"meeting":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date":{"type":"string","description":"Meeting date","format":"date-time"},"id":{"type":"string","format":"string"},"minutes":{"description":"Meeting minutes","anyOf":[{"type":"string","description":"Meeting minutes"},{"type":"null","description":"No minutes"}]},"name":{"type":"string","description":"Meeting name"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","name","date","created_at","updated_at"]}},"required":["meeting"]}`) AddNonconformityToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"audit_id":{"description":"Audit ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No audit"}]},"corrective_action":{"type":"string","description":"Corrective action"},"date_identified":{"type":"string","description":"Date identified","format":"date-time"},"description":{"type":"string","description":"Description"},"due_date":{"type":"string","description":"Due date","format":"date-time"},"effectiveness_check":{"type":"string","description":"Effectiveness check"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"reference_id":{"type":"string","description":"Reference ID"},"root_cause":{"type":"string","description":"Root cause"},"status":{"description":"Status","anyOf":[{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},{"type":"null","description":"No status"}]}},"required":["organization_id","reference_id","root_cause","owner_id","status"]}`) AddNonconformityToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"nonconformity":{"type":"object","properties":{"audit_id":{"description":"Audit ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No audit"}]},"corrective_action":{"description":"Corrective action"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date_identified":{"description":"Date identified","format":"date-time"},"description":{"description":"Description"},"due_date":{"description":"Due date","format":"date-time"},"effectiveness_check":{"description":"Effectiveness check"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"reference_id":{"type":"string","description":"Reference ID"},"root_cause":{"type":"string","description":"Root cause"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","reference_id","root_cause","owner_id","status","created_at","updated_at"]}},"required":["nonconformity"]}`) AddObligationToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"actions_to_be_implemented":{"type":"string","description":"Actions to be implemented"},"area":{"type":"string","description":"Area"},"due_date":{"type":"string","description":"Due date","format":"date-time"},"last_review_date":{"type":"string","description":"Last review date","format":"date-time"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"regulator":{"type":"string","description":"Regulator"},"requirement":{"type":"string","description":"Requirement"},"source":{"type":"string","description":"Source"},"status":{"description":"Status","anyOf":[{"type":"string","enum":["NON_COMPLIANT","PARTIALLY_COMPLIANT","COMPLIANT"]},{"type":"null","description":"No status"}]},"type":{"description":"Type","anyOf":[{"type":"string","enum":["LEGAL","CONTRACTUAL"]},{"type":"null","description":"No type"}]}},"required":["organization_id","owner_id","status","type"]}`) @@ -51,6 +53,8 @@ var ( DeleteDocumentToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"deleted_document_id":{"type":"string","format":"string"}},"required":["deleted_document_id"]}`) DeleteDraftDocumentVersionToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"document_version_id":{"type":"string","format":"string"}},"required":["document_version_id"]}`) DeleteDraftDocumentVersionToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"deleted_document_version_id":{"type":"string","format":"string"}},"required":["deleted_document_version_id"]}`) + DeleteMeetingToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) + DeleteMeetingToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"deleted_meeting_id":{"type":"string","format":"string"}},"required":["deleted_meeting_id"]}`) GetAssetToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) GetAssetToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"asset":{"type":"object","properties":{"amount":{"type":"integer","description":"Asset amount"},"asset_type":{"type":"string","enum":["PHYSICAL","VIRTUAL"]},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"data_types_stored":{"type":"string","description":"Data types stored"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Asset name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"snapshot_id":{"description":"Snapshot ID"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","name","amount","owner_id","asset_type","data_types_stored","created_at","updated_at"]}},"required":["asset"]}`) GetAuditToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) @@ -71,6 +75,8 @@ var ( GetFrameworkToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"framework":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Framework description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Framework name"},"organization_id":{"type":"string","format":"string"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","name","created_at","updated_at"]}},"required":["framework"]}`) GetMeasureToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) GetMeasureToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"measure":{"type":"object","properties":{"category":{"type":"string","description":"Measure category"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Measure description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Measure name"},"state":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","NOT_APPLICABLE","IMPLEMENTED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","category","name","state","created_at","updated_at"]}},"required":["measure"]}`) + GetMeetingToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) + GetMeetingToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"meeting":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date":{"type":"string","description":"Meeting date","format":"date-time"},"id":{"type":"string","format":"string"},"minutes":{"description":"Meeting minutes","anyOf":[{"type":"string","description":"Meeting minutes"},{"type":"null","description":"No minutes"}]},"name":{"type":"string","description":"Meeting name"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","name","date","created_at","updated_at"]}},"required":["meeting"]}`) GetNonconformityToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) GetNonconformityToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"nonconformity":{"type":"object","properties":{"audit_id":{"description":"Audit ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No audit"}]},"corrective_action":{"description":"Corrective action"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date_identified":{"description":"Date identified","format":"date-time"},"description":{"description":"Description"},"due_date":{"description":"Due date","format":"date-time"},"effectiveness_check":{"description":"Effectiveness check"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"reference_id":{"type":"string","description":"Reference ID"},"root_cause":{"type":"string","description":"Root cause"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","reference_id","root_cause","owner_id","status","created_at","updated_at"]}},"required":["nonconformity"]}`) GetObligationToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"id":{"type":"string","format":"string"}},"required":["id"]}`) @@ -111,6 +117,8 @@ var ( ListFrameworksToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"frameworks":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Framework description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Framework name"},"organization_id":{"type":"string","format":"string"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","name","created_at","updated_at"]}},"next_cursor":{"type":"string","format":"string"}},"required":["frameworks"]}`) ListMeasuresToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"cursor":{"type":"string","format":"string"},"filter":{"type":"object","properties":{"query":{"type":"string","description":"Search query"},"state":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","NOT_APPLICABLE","IMPLEMENTED"]}}},"order_by":{"type":"object","properties":{"direction":{"type":"string","enum":["ASC","DESC"]},"field":{"type":"string","enum":["CREATED_AT","NAME"]}},"required":["field","direction"]},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}},"required":["organization_id"]}`) ListMeasuresToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"measures":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","description":"Measure category"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Measure description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Measure name"},"state":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","NOT_APPLICABLE","IMPLEMENTED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","category","name","state","created_at","updated_at"]}},"next_cursor":{"type":"string","format":"string"}},"required":["measures"]}`) + ListMeetingsToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"cursor":{"type":"string","format":"string"},"order_by":{"type":"object","properties":{"direction":{"type":"string","enum":["ASC","DESC"]},"field":{"type":"string","enum":["CREATED_AT","DATE","NAME"]}},"required":["field","direction"]},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}},"required":["organization_id"]}`) + ListMeetingsToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"meetings":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date":{"type":"string","description":"Meeting date","format":"date-time"},"id":{"type":"string","format":"string"},"minutes":{"description":"Meeting minutes","anyOf":[{"type":"string","description":"Meeting minutes"},{"type":"null","description":"No minutes"}]},"name":{"type":"string","description":"Meeting name"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","name","date","created_at","updated_at"]},"description":"List of meetings"},"next_cursor":{"description":"Next page cursor","anyOf":[{"type":"string","format":"string"},{"type":"null"}]}},"required":["meetings"]}`) ListNonconformitiesToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"cursor":{"type":"string","format":"string"},"filter":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"string"}}},"order_by":{"type":"object","properties":{"direction":{"type":"string","enum":["ASC","DESC"]},"field":{"type":"string","enum":["CREATED_AT","REFERENCE_ID","DATE_IDENTIFIED","DUE_DATE","STATUS"]}},"required":["field","direction"]},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}},"required":["organization_id"]}`) ListNonconformitiesToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"next_cursor":{"type":"string","format":"string"},"nonconformities":{"type":"array","items":{"type":"object","properties":{"audit_id":{"description":"Audit ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No audit"}]},"corrective_action":{"description":"Corrective action"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date_identified":{"description":"Date identified","format":"date-time"},"description":{"description":"Description"},"due_date":{"description":"Due date","format":"date-time"},"effectiveness_check":{"description":"Effectiveness check"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"reference_id":{"type":"string","description":"Reference ID"},"root_cause":{"type":"string","description":"Root cause"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","reference_id","root_cause","owner_id","status","created_at","updated_at"]}}},"required":["nonconformities"]}`) ListObligationsToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"cursor":{"type":"string","format":"string"},"filter":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"string"}}},"order_by":{"type":"object","properties":{"direction":{"type":"string","enum":["ASC","DESC"]},"field":{"type":"string","enum":["CREATED_AT","LAST_REVIEW_DATE","DUE_DATE","STATUS"]}},"required":["field","direction"]},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}},"required":["organization_id"]}`) @@ -161,6 +169,8 @@ var ( UpdateFrameworkToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"framework":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Framework description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Framework name"},"organization_id":{"type":"string","format":"string"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","name","created_at","updated_at"]}},"required":["framework"]}`) UpdateMeasureToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"category":{"type":"string","description":"Measure category"},"description":{"description":"Measure description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Measure name"},"state":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","NOT_APPLICABLE","IMPLEMENTED"]}},"required":["id"]}`) UpdateMeasureToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"measure":{"type":"object","properties":{"category":{"type":"string","description":"Measure category"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Measure description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Measure name"},"state":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","NOT_APPLICABLE","IMPLEMENTED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","category","name","state","created_at","updated_at"]}},"required":["measure"]}`) + UpdateMeetingToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"attendee_ids":{"type":"array","items":{"type":"string","format":"string"},"description":"List of attendee profile IDs"},"date":{"type":"string","description":"Meeting date","format":"date-time"},"id":{"type":"string","format":"string"},"minutes":{"description":"Meeting minutes"},"name":{"type":"string","description":"Meeting name"}},"required":["id"]}`) + UpdateMeetingToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"meeting":{"type":"object","properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date":{"type":"string","description":"Meeting date","format":"date-time"},"id":{"type":"string","format":"string"},"minutes":{"description":"Meeting minutes","anyOf":[{"type":"string","description":"Meeting minutes"},{"type":"null","description":"No minutes"}]},"name":{"type":"string","description":"Meeting name"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","name","date","created_at","updated_at"]}},"required":["meeting"]}`) UpdateNonconformityToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"audit_id":{"description":"Audit ID","anyOf":[{"type":"string","format":"string"},{"type":"null"}]},"corrective_action":{"description":"Corrective action"},"date_identified":{"description":"Date identified","format":"date-time"},"description":{"description":"Description"},"due_date":{"description":"Due date","format":"date-time"},"effectiveness_check":{"description":"Effectiveness check"},"id":{"type":"string","format":"string"},"owner_id":{"description":"Owner ID","anyOf":[{"type":"string","format":"string"},{"type":"null"}]},"reference_id":{"type":"string","description":"Reference ID"},"root_cause":{"type":"string","description":"Root cause"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]}},"required":["id"]}`) UpdateNonconformityToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"nonconformity":{"type":"object","properties":{"audit_id":{"description":"Audit ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No audit"}]},"corrective_action":{"description":"Corrective action"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"date_identified":{"description":"Date identified","format":"date-time"},"description":{"description":"Description"},"due_date":{"description":"Due date","format":"date-time"},"effectiveness_check":{"description":"Effectiveness check"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"reference_id":{"type":"string","description":"Reference ID"},"root_cause":{"type":"string","description":"Root cause"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}},"required":["id","organization_id","reference_id","root_cause","owner_id","status","created_at","updated_at"]}},"required":["nonconformity"]}`) UpdateObligationToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","properties":{"actions_to_be_implemented":{"description":"Actions to be implemented"},"area":{"description":"Area"},"due_date":{"description":"Due date","format":"date-time"},"id":{"type":"string","format":"string"},"last_review_date":{"description":"Last review date","format":"date-time"},"owner_id":{"description":"Owner ID","anyOf":[{"type":"string","format":"string"},{"type":"null"}]},"regulator":{"description":"Regulator"},"requirement":{"description":"Requirement"},"source":{"description":"Source"},"status":{"description":"Status","anyOf":[{"type":"string","enum":["NON_COMPLIANT","PARTIALLY_COMPLIANT","COMPLIANT"]},{"type":"null","description":"No status"}]},"type":{"description":"Type","anyOf":[{"type":"string","enum":["LEGAL","CONTRACTUAL"]},{"type":"null","description":"No type"}]}},"required":["id"]}`) @@ -642,6 +652,25 @@ type AddMeasureOutput struct { Measure *Measure `json:"measure"` } +// AddMeetingInput represents the schema +type AddMeetingInput struct { + // List of attendee profile IDs + AttendeeIds []gid.GID `json:"attendee_ids,omitempty"` + // Meeting date + Date time.Time `json:"date"` + // Meeting minutes + Minutes *string `json:"minutes,omitempty"` + // Meeting name + Name string `json:"name"` + // Organization ID + OrganizationID gid.GID `json:"organization_id"` +} + +// AddMeetingOutput represents the schema +type AddMeetingOutput struct { + Meeting *Meeting `json:"meeting"` +} + // AddNonconformityInput represents the schema type AddNonconformityInput struct { // Audit ID @@ -1029,6 +1058,18 @@ type DeleteDraftDocumentVersionOutput struct { DeletedDocumentVersionID gid.GID `json:"deleted_document_version_id"` } +// DeleteMeetingInput represents the schema +type DeleteMeetingInput struct { + // Meeting ID + ID gid.GID `json:"id"` +} + +// DeleteMeetingOutput represents the schema +type DeleteMeetingOutput struct { + // Deleted meeting ID + DeletedMeetingID gid.GID `json:"deleted_meeting_id"` +} + // Document represents the schema type Document struct { // Document classification @@ -1263,6 +1304,17 @@ type GetMeasureOutput struct { Measure *Measure `json:"measure"` } +// GetMeetingInput represents the schema +type GetMeetingInput struct { + // Meeting ID + ID gid.GID `json:"id"` +} + +// GetMeetingOutput represents the schema +type GetMeetingOutput struct { + Meeting *Meeting `json:"meeting"` +} + // GetNonconformityInput represents the schema type GetNonconformityInput struct { // Nonconformity ID @@ -1576,6 +1628,26 @@ type ListMeasuresOutput struct { NextCursor *page.CursorKey `json:"next_cursor,omitempty"` } +// ListMeetingsInput represents the schema +type ListMeetingsInput struct { + // Page cursor + Cursor *page.CursorKey `json:"cursor,omitempty"` + // Meeting order by + OrderBy *MeetingOrderBy `json:"order_by,omitempty"` + // Organization ID + OrganizationID gid.GID `json:"organization_id"` + // Page size + Size *int `json:"size,omitempty"` +} + +// ListMeetingsOutput represents the schema +type ListMeetingsOutput struct { + // List of meetings + Meetings []*Meeting `json:"meetings"` + // Next page cursor + NextCursor *page.CursorKey `json:"next_cursor,omitempty"` +} + // ListNonconformitiesInput represents the schema type ListNonconformitiesInput struct { // Page cursor @@ -1755,6 +1827,30 @@ type MeasureOrderBy struct { Field coredata.MeasureOrderField `json:"field"` } +// Meeting represents the schema +type Meeting struct { + // Creation timestamp + CreatedAt time.Time `json:"created_at"` + // Meeting date + Date time.Time `json:"date"` + // Meeting ID + ID gid.GID `json:"id"` + // Meeting minutes + Minutes *string `json:"minutes,omitempty"` + // Meeting name + Name string `json:"name"` + // Update timestamp + UpdatedAt time.Time `json:"updated_at"` +} + +// MeetingOrderBy represents the schema +type MeetingOrderBy struct { + // Meeting order direction + Direction page.OrderDirection `json:"direction"` + // Meeting order field + Field coredata.MeetingOrderField `json:"field"` +} + // Nonconformity represents the schema type Nonconformity struct { // Audit ID @@ -2270,6 +2366,25 @@ type UpdateMeasureOutput struct { Measure *Measure `json:"measure"` } +// UpdateMeetingInput represents the schema +type UpdateMeetingInput struct { + // List of attendee profile IDs + AttendeeIds []gid.GID `json:"attendee_ids,omitempty"` + // Meeting date + Date *time.Time `json:"date,omitempty"` + // Meeting ID + ID gid.GID `json:"id"` + // Meeting minutes + Minutes mcp.Omittable[*string] `json:"minutes,omitempty"` + // Meeting name + Name *string `json:"name,omitempty"` +} + +// UpdateMeetingOutput represents the schema +type UpdateMeetingOutput struct { + Meeting *Meeting `json:"meeting"` +} + // UpdateNonconformityInput represents the schema type UpdateNonconformityInput struct { // Audit ID