Add continious improvment tools

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-11-23 21:55:00 +01:00
parent 1b52585ab2
commit 112c793328
5 changed files with 679 additions and 70 deletions

View File

@@ -875,3 +875,96 @@ func (r *Resolver) UpdateObligationTool(ctx context.Context, req *mcp.CallToolRe
Obligation: types.NewObligation(obligation),
}, nil
}
func (r *Resolver) ListContinualImprovementsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListContinualImprovementsInput) (*mcp.CallToolResult, types.ListContinualImprovementsOutput, error) {
r.MustBeAuthorized(ctx, input.OrganizationID, authz.ActionListContinualImprovements)
prb := r.ProboService(ctx, input.OrganizationID)
pageOrderBy := page.OrderBy[coredata.ContinualImprovementOrderField]{
Field: coredata.ContinualImprovementOrderFieldCreatedAt,
Direction: page.OrderDirectionDesc,
}
if input.OrderBy != nil {
pageOrderBy = page.OrderBy[coredata.ContinualImprovementOrderField]{
Field: input.OrderBy.Field,
Direction: input.OrderBy.Direction,
}
}
cursor := types.NewCursor(input.Size, input.Cursor, pageOrderBy)
var continualImprovementFilter = coredata.NewContinualImprovementFilter(nil)
if input.Filter != nil {
continualImprovementFilter = coredata.NewContinualImprovementFilter(&input.Filter.SnapshotID)
}
page, err := prb.ContinualImprovements.ListForOrganizationID(ctx, input.OrganizationID, cursor, continualImprovementFilter)
if err != nil {
panic(fmt.Errorf("cannot list organization continual improvements: %w", err))
}
return nil, types.NewListContinualImprovementsOutput(page), nil
}
func (r *Resolver) GetContinualImprovementTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetContinualImprovementInput) (*mcp.CallToolResult, types.GetContinualImprovementOutput, error) {
r.MustBeAuthorized(ctx, input.ID, authz.ActionGet)
prb := r.ProboService(ctx, input.ID)
continualImprovement, err := prb.ContinualImprovements.Get(ctx, input.ID)
if err != nil {
return nil, types.GetContinualImprovementOutput{}, fmt.Errorf("failed to get continual improvement: %w", err)
}
return nil, types.GetContinualImprovementOutput{
ContinualImprovement: types.NewContinualImprovement(continualImprovement),
}, nil
}
func (r *Resolver) AddContinualImprovementTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddContinualImprovementInput) (*mcp.CallToolResult, types.AddContinualImprovementOutput, error) {
r.MustBeAuthorized(ctx, input.OrganizationID, authz.ActionCreateContinualImprovement)
svc := r.ProboService(ctx, input.OrganizationID)
continualImprovement, err := svc.ContinualImprovements.Create(
ctx,
&probo.CreateContinualImprovementRequest{
OrganizationID: input.OrganizationID,
},
)
if err != nil {
return nil, types.AddContinualImprovementOutput{}, fmt.Errorf("failed to create continual improvement: %w", err)
}
return nil, types.AddContinualImprovementOutput{
ContinualImprovement: types.NewContinualImprovement(continualImprovement),
}, nil
}
func (r *Resolver) UpdateContinualImprovementTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateContinualImprovementInput) (*mcp.CallToolResult, types.UpdateContinualImprovementOutput, error) {
r.MustBeAuthorized(ctx, input.ID, authz.ActionUpdateContinualImprovement)
svc := r.ProboService(ctx, input.ID)
continualImprovement, err := svc.ContinualImprovements.Update(
ctx,
&probo.UpdateContinualImprovementRequest{
ID: input.ID,
ReferenceID: input.ReferenceID,
Description: UnwrapOmittable(input.Description),
Source: UnwrapOmittable(input.Source),
OwnerID: input.OwnerID,
TargetDate: UnwrapOmittable(input.TargetDate),
Status: input.Status,
Priority: input.Priority,
},
)
if err != nil {
return nil, types.UpdateContinualImprovementOutput{}, fmt.Errorf("failed to update continual improvement: %w", err)
}
return nil, types.UpdateContinualImprovementOutput{
ContinualImprovement: types.NewContinualImprovement(continualImprovement),
}, nil
}

View File

@@ -45,6 +45,10 @@ type ResolverInterface interface {
GetObligationTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetObligationInput) (*mcp.CallToolResult, types.GetObligationOutput, error)
AddObligationTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddObligationInput) (*mcp.CallToolResult, types.AddObligationOutput, error)
UpdateObligationTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateObligationInput) (*mcp.CallToolResult, types.UpdateObligationOutput, error)
ListContinualImprovementsTool(ctx context.Context, req *mcp.CallToolRequest, input *types.ListContinualImprovementsInput) (*mcp.CallToolResult, types.ListContinualImprovementsOutput, error)
GetContinualImprovementTool(ctx context.Context, req *mcp.CallToolRequest, input *types.GetContinualImprovementInput) (*mcp.CallToolResult, types.GetContinualImprovementOutput, error)
AddContinualImprovementTool(ctx context.Context, req *mcp.CallToolRequest, input *types.AddContinualImprovementInput) (*mcp.CallToolResult, types.AddContinualImprovementOutput, error)
UpdateContinualImprovementTool(ctx context.Context, req *mcp.CallToolRequest, input *types.UpdateContinualImprovementInput) (*mcp.CallToolResult, types.UpdateContinualImprovementOutput, error)
}
// New creates a new MCP server instance with all handlers registered.
@@ -414,4 +418,44 @@ func registerToolHandlers(server *mcp.Server, resolver ResolverInterface) {
},
resolver.UpdateObligationTool,
)
mcp.AddTool(
server,
&mcp.Tool{
Name: "listContinualImprovements",
Description: "List all continual improvements for the organization",
InputSchema: types.ListContinualImprovementsToolInputSchema,
OutputSchema: types.ListContinualImprovementsToolOutputSchema,
},
resolver.ListContinualImprovementsTool,
)
mcp.AddTool(
server,
&mcp.Tool{
Name: "getContinualImprovement",
Description: "Get a continual improvement by ID",
InputSchema: types.GetContinualImprovementToolInputSchema,
OutputSchema: types.GetContinualImprovementToolOutputSchema,
},
resolver.GetContinualImprovementTool,
)
mcp.AddTool(
server,
&mcp.Tool{
Name: "addContinualImprovement",
Description: "Add a new continual improvement to the organization",
InputSchema: types.AddContinualImprovementToolInputSchema,
OutputSchema: types.AddContinualImprovementToolOutputSchema,
},
resolver.AddContinualImprovementTool,
)
mcp.AddTool(
server,
&mcp.Tool{
Name: "updateContinualImprovement",
Description: "Update an existing continual improvement",
InputSchema: types.UpdateContinualImprovementToolInputSchema,
OutputSchema: types.UpdateContinualImprovementToolOutputSchema,
},
resolver.UpdateContinualImprovementTool,
)
}

View File

@@ -1959,6 +1959,262 @@ components:
obligation:
$ref: "#/components/schemas/Obligation"
ContinualImprovementStatus:
type: string
enum:
- OPEN
- IN_PROGRESS
- CLOSED
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.ContinualImprovementStatus
ContinualImprovementPriority:
type: string
enum:
- LOW
- MEDIUM
- HIGH
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.ContinualImprovementPriority
ContinualImprovementOrderField:
type: string
enum:
- CREATED_AT
- REFERENCE_ID
- TARGET_DATE
- STATUS
- PRIORITY
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.ContinualImprovementOrderField
ContinualImprovementOrderBy:
type: object
required:
- field
- direction
properties:
field:
$ref: "#/components/schemas/ContinualImprovementOrderField"
description: Continual improvement order field
direction:
$ref: "#/components/schemas/OrderDirection"
description: Continual improvement order direction
ContinualImprovement:
type: object
required:
- id
- organization_id
- reference_id
- owner_id
- status
- priority
- created_at
- updated_at
properties:
id:
$ref: "#/components/schemas/GID"
description: Continual improvement ID
organization_id:
$ref: "#/components/schemas/GID"
description: Organization ID
snapshot_id:
anyOf:
- $ref: "#/components/schemas/GID"
description: Snapshot ID
- type: "null"
description: No snapshot
description: Snapshot ID
source_id:
type:
- string
- "null"
description: Source ID
reference_id:
type: string
description: Reference ID
description:
type:
- string
- "null"
description: Description
source:
type:
- string
- "null"
description: Source
owner_id:
$ref: "#/components/schemas/GID"
description: Owner ID
target_date:
type:
- string
- "null"
format: date-time
description: Target date
status:
$ref: "#/components/schemas/ContinualImprovementStatus"
description: Status
priority:
$ref: "#/components/schemas/ContinualImprovementPriority"
description: Priority
created_at:
type: string
format: date-time
description: Creation timestamp
updated_at:
type: string
format: date-time
description: Update timestamp
ListContinualImprovementsInput:
type: object
required:
- organization_id
properties:
organization_id:
$ref: "#/components/schemas/GID"
description: Organization ID
order_by:
$ref: "#/components/schemas/ContinualImprovementOrderBy"
description: Continual improvement order by
size:
type: integer
description: Page size
cursor:
$ref: "#/components/schemas/CursorKey"
description: Page cursor
filter:
type: object
properties:
snapshot_id:
$ref: "#/components/schemas/GID"
description: Snapshot ID
ListContinualImprovementsOutput:
type: object
required:
- continual_improvements
properties:
next_cursor:
$ref: "#/components/schemas/CursorKey"
description: Next cursor
continual_improvements:
type: array
items:
$ref: "#/components/schemas/ContinualImprovement"
GetContinualImprovementInput:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/GID"
description: Continual improvement ID
GetContinualImprovementOutput:
type: object
required:
- continual_improvement
properties:
continual_improvement:
$ref: "#/components/schemas/ContinualImprovement"
AddContinualImprovementInput:
type: object
required:
- organization_id
- reference_id
- owner_id
- status
- priority
properties:
organization_id:
$ref: "#/components/schemas/GID"
description: Organization ID
reference_id:
type: string
description: Reference ID
description:
type: string
description: Description
source:
type: string
description: Source
owner_id:
$ref: "#/components/schemas/GID"
description: Owner ID
target_date:
type: string
format: date-time
description: Target date
status:
$ref: "#/components/schemas/ContinualImprovementStatus"
description: Status
priority:
$ref: "#/components/schemas/ContinualImprovementPriority"
description: Priority
AddContinualImprovementOutput:
type: object
required:
- continual_improvement
properties:
continual_improvement:
$ref: "#/components/schemas/ContinualImprovement"
UpdateContinualImprovementInput:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/GID"
description: Continual improvement ID
reference_id:
type: string
description: Reference ID
description:
type: ["string", "null"]
description: Description
go.probo.inc/mcpgen/omittable: true
source:
type: ["string", "null"]
description: Source
go.probo.inc/mcpgen/omittable: true
owner_id:
anyOf:
- type: string
$ref: "#/components/schemas/GID"
- type: "null"
description: Owner ID
target_date:
type: ["string", "null"]
format: date-time
description: Target date
go.probo.inc/mcpgen/omittable: true
status:
anyOf:
- $ref: "#/components/schemas/ContinualImprovementStatus"
description: Continual improvement status
- type: "null"
description: No status
description: Status
priority:
anyOf:
- $ref: "#/components/schemas/ContinualImprovementPriority"
description: Continual improvement priority
- type: "null"
description: No priority
description: Priority
UpdateContinualImprovementOutput:
type: object
required:
- continual_improvement
properties:
continual_improvement:
$ref: "#/components/schemas/ContinualImprovement"
tools:
- name: listOrganizations
description: List all organizations the user has access to
@@ -2205,3 +2461,31 @@ tools:
$ref: "#/components/schemas/UpdateObligationInput"
outputSchema:
$ref: "#/components/schemas/UpdateObligationOutput"
- name: listContinualImprovements
description: List all continual improvements for the organization
readonly: true
inputSchema:
$ref: "#/components/schemas/ListContinualImprovementsInput"
outputSchema:
$ref: "#/components/schemas/ListContinualImprovementsOutput"
- name: getContinualImprovement
description: Get a continual improvement by ID
readonly: true
inputSchema:
$ref: "#/components/schemas/GetContinualImprovementInput"
outputSchema:
$ref: "#/components/schemas/GetContinualImprovementOutput"
- name: addContinualImprovement
description: Add a new continual improvement to the organization
readonly: false
inputSchema:
$ref: "#/components/schemas/AddContinualImprovementInput"
outputSchema:
$ref: "#/components/schemas/AddContinualImprovementOutput"
- name: updateContinualImprovement
description: Update an existing continual improvement
readonly: false
inputSchema:
$ref: "#/components/schemas/UpdateContinualImprovementInput"
outputSchema:
$ref: "#/components/schemas/UpdateContinualImprovementOutput"

View File

@@ -0,0 +1,55 @@
// Copyright (c) 2025 Probo Inc <hello@getprobo.com>.
//
// 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 NewContinualImprovement(c *coredata.ContinualImprovement) *ContinualImprovement {
return &ContinualImprovement{
ID: c.ID,
OrganizationID: c.OrganizationID,
ReferenceID: c.ReferenceID,
Description: c.Description,
Source: c.Source,
OwnerID: c.OwnerID,
TargetDate: c.TargetDate,
Status: c.Status,
Priority: c.Priority,
SnapshotID: c.SnapshotID,
CreatedAt: c.CreatedAt,
UpdatedAt: c.UpdatedAt,
}
}
func NewListContinualImprovementsOutput(continualImprovementPage *page.Page[*coredata.ContinualImprovement, coredata.ContinualImprovementOrderField]) ListContinualImprovementsOutput {
continualImprovements := make([]*ContinualImprovement, 0, len(continualImprovementPage.Data))
for _, v := range continualImprovementPage.Data {
continualImprovements = append(continualImprovements, NewContinualImprovement(v))
}
var nextCursor *page.CursorKey
if len(continualImprovementPage.Data) > 0 {
cursorKey := continualImprovementPage.Data[len(continualImprovementPage.Data)-1].CursorKey(continualImprovementPage.Cursor.OrderBy.Field)
nextCursor = &cursorKey
}
return ListContinualImprovementsOutput{
NextCursor: nextCursor,
ContinualImprovements: continualImprovements,
}
}

View File

@@ -14,6 +14,8 @@ import (
var (
AddAssetToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id","name","amount","owner_id","asset_type","data_types_stored"],"properties":{"amount":{"type":"integer","description":"Asset amount"},"asset_type":{"type":"string","enum":["PHYSICAL","VIRTUAL"]},"data_types_stored":{"type":"string","description":"Data types stored"},"name":{"type":"string","description":"Asset name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"vendor_ids":{"type":"array","description":"Vendor IDs","items":{"type":"string","format":"string"}}}}`)
AddAssetToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["asset"],"properties":{"asset":{"type":"object","required":["id","organization_id","name","amount","owner_id","asset_type","data_types_stored","created_at","updated_at"],"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"}}}}}`)
AddContinualImprovementToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id","reference_id","owner_id","status","priority"],"properties":{"description":{"type":"string","description":"Description"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"reference_id":{"type":"string","description":"Reference ID"},"source":{"type":"string","description":"Source"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"target_date":{"type":"string","description":"Target date","format":"date-time"}}}`)
AddContinualImprovementToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["continual_improvement"],"properties":{"continual_improvement":{"type":"object","required":["id","organization_id","reference_id","owner_id","status","priority","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Description"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"reference_id":{"type":"string","description":"Reference ID"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"source":{"description":"Source"},"source_id":{"description":"Source ID"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"target_date":{"description":"Target date","format":"date-time"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
AddDatumToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id","name","data_classification","owner_id"],"properties":{"data_classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","SECRET"]},"name":{"type":"string","description":"Datum name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"vendor_ids":{"type":"array","description":"Vendor IDs","items":{"type":"string","format":"string"}}}}`)
AddDatumToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["datum"],"properties":{"datum":{"type":"object","required":["id","organization_id","name","data_classification","owner_id","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"data_classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","SECRET"]},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Datum name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
AddFrameworkToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id","name"],"properties":{"description":{"type":"string","description":"Framework description"},"name":{"type":"string","description":"Framework name"},"organization_id":{"type":"string","format":"string"}}}`)
@@ -32,6 +34,8 @@ var (
AddVendorToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["vendor"],"properties":{"vendor":{"type":"object","required":["id","name","organization_id","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Vendor description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Vendor name"},"organization_id":{"type":"string","format":"string"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
GetAssetToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"string"}}}`)
GetAssetToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["asset"],"properties":{"asset":{"type":"object","required":["id","organization_id","name","amount","owner_id","asset_type","data_types_stored","created_at","updated_at"],"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"}}}}}`)
GetContinualImprovementToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"string"}}}`)
GetContinualImprovementToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["continual_improvement"],"properties":{"continual_improvement":{"type":"object","required":["id","organization_id","reference_id","owner_id","status","priority","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Description"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"reference_id":{"type":"string","description":"Reference ID"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"source":{"description":"Source"},"source_id":{"description":"Source ID"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"target_date":{"description":"Target date","format":"date-time"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
GetDatumToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"string"}}}`)
GetDatumToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["datum"],"properties":{"datum":{"type":"object","required":["id","organization_id","name","data_classification","owner_id","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"data_classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","SECRET"]},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Datum name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
GetFrameworkToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"string"}}}`)
@@ -48,6 +52,8 @@ var (
GetRiskToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["risk"],"properties":{"risk":{"type":"object","required":["id","organization_id","name","category","treatment","inherent_likelihood","inherent_impact","inherent_risk_score","residual_likelihood","residual_impact","residual_risk_score","note","created_at","updated_at"],"properties":{"category":{"type":"string","description":"Risk category"},"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Risk description"},"id":{"type":"string","format":"string"},"inherent_impact":{"type":"integer","description":"Inherent impact"},"inherent_likelihood":{"type":"integer","description":"Inherent likelihood"},"inherent_risk_score":{"type":"integer","description":"Inherent risk score"},"name":{"type":"string","description":"Risk name"},"note":{"type":"string","description":"Risk note"},"organization_id":{"type":"string","format":"string"},"owner_id":{"description":"Owner ID"},"residual_impact":{"type":"integer","description":"Residual impact"},"residual_likelihood":{"type":"integer","description":"Residual likelihood"},"residual_risk_score":{"type":"integer","description":"Residual risk score"},"snapshot_id":{"description":"Snapshot ID"},"treatment":{"type":"string","enum":["MITIGATED","ACCEPTED","AVOIDED","TRANSFERRED"]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
ListAssetsToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id"],"properties":{"cursor":{"type":"string","format":"string"},"filter":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"string"}}},"order_by":{"type":"object","required":["field","direction"],"properties":{"direction":{"type":"string","enum":["asc","desc"]},"field":{"type":"string","enum":["CREATED_AT","AMOUNT"]}}},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}}}`)
ListAssetsToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["assets"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["id","organization_id","name","amount","owner_id","asset_type","data_types_stored","created_at","updated_at"],"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"}}}},"next_cursor":{"type":"string","format":"string"}}}`)
ListContinualImprovementsToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id"],"properties":{"cursor":{"type":"string","format":"string"},"filter":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"string"}}},"order_by":{"type":"object","required":["field","direction"],"properties":{"direction":{"type":"string","enum":["asc","desc"]},"field":{"type":"string","enum":["CREATED_AT","REFERENCE_ID","TARGET_DATE","STATUS","PRIORITY"]}}},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}}}`)
ListContinualImprovementsToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["continual_improvements"],"properties":{"continual_improvements":{"type":"array","items":{"type":"object","required":["id","organization_id","reference_id","owner_id","status","priority","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Description"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"reference_id":{"type":"string","description":"Reference ID"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"source":{"description":"Source"},"source_id":{"description":"Source ID"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"target_date":{"description":"Target date","format":"date-time"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}},"next_cursor":{"type":"string","format":"string"}}}`)
ListDataToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id"],"properties":{"cursor":{"type":"string","format":"string"},"filter":{"type":"object","properties":{"snapshot_id":{"type":"string","format":"string"}}},"order_by":{"type":"object","required":["field","direction"],"properties":{"direction":{"type":"string","enum":["asc","desc"]},"field":{"type":"string","enum":["CREATED_AT","NAME","DATA_CLASSIFICATION"]}}},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}}}`)
ListDataToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","organization_id","name","data_classification","owner_id","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"data_classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","SECRET"]},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Datum name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}},"next_cursor":{"type":"string","format":"string"}}}`)
ListFrameworksToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["organization_id"],"properties":{"cursor":{"type":"string","format":"string"},"order_by":{"type":"object","required":["field","direction"],"properties":{"direction":{"type":"string","enum":["asc","desc"]},"field":{"type":"string","enum":["CREATED_AT"]}}},"organization_id":{"type":"string","format":"string"},"size":{"type":"integer","description":"Page size"}}}`)
@@ -68,6 +74,8 @@ var (
ListVendorsToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["vendors"],"properties":{"next_cursor":{"type":"string","format":"string"},"vendors":{"type":"array","items":{"type":"object","required":["id","name","organization_id","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Vendor description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Vendor name"},"organization_id":{"type":"string","format":"string"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}}`)
UpdateAssetToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"amount":{"type":"integer","description":"Asset amount"},"asset_type":{"type":"string","enum":["PHYSICAL","VIRTUAL"]},"data_types_stored":{"type":"string","description":"Data types stored"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Asset name"},"owner_id":{"description":"Owner ID","anyOf":[{"type":"string","format":"string"},{"type":"null"}]},"vendor_ids":{"type":"array","description":"Vendor IDs","items":{"type":"string","format":"string"}}}}`)
UpdateAssetToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["asset"],"properties":{"asset":{"type":"object","required":["id","organization_id","name","amount","owner_id","asset_type","data_types_stored","created_at","updated_at"],"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"}}}}}`)
UpdateContinualImprovementToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"description":{"description":"Description"},"id":{"type":"string","format":"string"},"owner_id":{"description":"Owner ID","anyOf":[{"type":"string","format":"string"},{"type":"null"}]},"priority":{"description":"Priority","anyOf":[{"type":"string","enum":["LOW","MEDIUM","HIGH"]},{"type":"null","description":"No priority"}]},"reference_id":{"type":"string","description":"Reference ID"},"source":{"description":"Source"},"status":{"description":"Status","anyOf":[{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},{"type":"null","description":"No status"}]},"target_date":{"description":"Target date","format":"date-time"}}}`)
UpdateContinualImprovementToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["continual_improvement"],"properties":{"continual_improvement":{"type":"object","required":["id","organization_id","reference_id","owner_id","status","priority","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"description":{"description":"Description"},"id":{"type":"string","format":"string"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH"]},"reference_id":{"type":"string","description":"Reference ID"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"source":{"description":"Source"},"source_id":{"description":"Source ID"},"status":{"type":"string","enum":["OPEN","IN_PROGRESS","CLOSED"]},"target_date":{"description":"Target date","format":"date-time"},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
UpdateDatumToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"data_classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","SECRET"]},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Datum name"},"owner_id":{"description":"Owner ID","anyOf":[{"type":"string","format":"string"},{"type":"null"}]},"vendor_ids":{"type":"array","description":"Vendor IDs","items":{"type":"string","format":"string"}}}}`)
UpdateDatumToolOutputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["datum"],"properties":{"datum":{"type":"object","required":["id","organization_id","name","data_classification","owner_id","created_at","updated_at"],"properties":{"created_at":{"type":"string","description":"Creation timestamp","format":"date-time"},"data_classification":{"type":"string","enum":["PUBLIC","INTERNAL","CONFIDENTIAL","SECRET"]},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Datum name"},"organization_id":{"type":"string","format":"string"},"owner_id":{"type":"string","format":"string"},"snapshot_id":{"description":"Snapshot ID","anyOf":[{"type":"string","format":"string"},{"type":"null","description":"No snapshot"}]},"updated_at":{"type":"string","description":"Update timestamp","format":"date-time"}}}}}`)
UpdateFrameworkToolInputSchema = mcp.MustUnmarshalSchema(`{"type":"object","required":["id"],"properties":{"description":{"description":"Framework description"},"id":{"type":"string","format":"string"},"name":{"type":"string","description":"Framework name"}}}`)
@@ -107,6 +115,31 @@ type AddAssetOutput struct {
Asset *Asset `json:"asset"`
}
// AddContinualImprovementInput represents the schema
type AddContinualImprovementInput struct {
// Description
Description *string `json:"description,omitempty"`
// Organization ID
OrganizationID gid.GID `json:"organization_id"`
// Owner ID
OwnerID gid.GID `json:"owner_id"`
// Priority
Priority coredata.ContinualImprovementPriority `json:"priority"`
// Reference ID
ReferenceID string `json:"reference_id"`
// Source
Source *string `json:"source,omitempty"`
// Status
Status coredata.ContinualImprovementStatus `json:"status"`
// Target date
TargetDate *time.Time `json:"target_date,omitempty"`
}
// AddContinualImprovementOutput represents the schema
type AddContinualImprovementOutput struct {
ContinualImprovement *ContinualImprovement `json:"continual_improvement"`
}
// AddDatumInput represents the schema
type AddDatumInput struct {
// Data classification
@@ -325,6 +358,44 @@ type AssetOrderBy struct {
Field coredata.AssetOrderField `json:"field"`
}
// ContinualImprovement represents the schema
type ContinualImprovement struct {
// Creation timestamp
CreatedAt time.Time `json:"created_at"`
// Description
Description *string `json:"description,omitempty"`
// Continual improvement ID
ID gid.GID `json:"id"`
// Organization ID
OrganizationID gid.GID `json:"organization_id"`
// Owner ID
OwnerID gid.GID `json:"owner_id"`
// Priority
Priority coredata.ContinualImprovementPriority `json:"priority"`
// Reference ID
ReferenceID string `json:"reference_id"`
// Snapshot ID
SnapshotID *gid.GID `json:"snapshot_id,omitempty"`
// Source
Source *string `json:"source,omitempty"`
// Source ID
SourceID *string `json:"source_id,omitempty"`
// Status
Status coredata.ContinualImprovementStatus `json:"status"`
// Target date
TargetDate *time.Time `json:"target_date,omitempty"`
// Update timestamp
UpdatedAt time.Time `json:"updated_at"`
}
// ContinualImprovementOrderBy represents the schema
type ContinualImprovementOrderBy struct {
// Continual improvement order direction
Direction page.OrderDirection `json:"direction"`
// Continual improvement order field
Field coredata.ContinualImprovementOrderField `json:"field"`
}
// Datum represents the schema
type Datum struct {
// Creation timestamp
@@ -388,6 +459,17 @@ type GetAssetOutput struct {
Asset *Asset `json:"asset"`
}
// GetContinualImprovementInput represents the schema
type GetContinualImprovementInput struct {
// Continual improvement ID
ID gid.GID `json:"id"`
}
// GetContinualImprovementOutput represents the schema
type GetContinualImprovementOutput struct {
ContinualImprovement *ContinualImprovement `json:"continual_improvement"`
}
// GetDatumInput represents the schema
type GetDatumInput struct {
// Datum ID
@@ -485,6 +567,26 @@ type ListAssetsOutput struct {
NextCursor *page.CursorKey `json:"next_cursor,omitempty"`
}
// ListContinualImprovementsInput represents the schema
type ListContinualImprovementsInput struct {
// Page cursor
Cursor *page.CursorKey `json:"cursor,omitempty"`
Filter *ListContinualImprovementsInputFilter `json:"filter,omitempty"`
// Continual improvement order by
OrderBy *ContinualImprovementOrderBy `json:"order_by,omitempty"`
// Organization ID
OrganizationID gid.GID `json:"organization_id"`
// Page size
Size *int `json:"size,omitempty"`
}
// ListContinualImprovementsOutput represents the schema
type ListContinualImprovementsOutput struct {
ContinualImprovements []*ContinualImprovement `json:"continual_improvements"`
// Next cursor
NextCursor *page.CursorKey `json:"next_cursor,omitempty"`
}
// ListDataInput represents the schema
type ListDataInput struct {
// Page cursor
@@ -882,6 +984,31 @@ type UpdateAssetOutput struct {
Asset *Asset `json:"asset"`
}
// UpdateContinualImprovementInput represents the schema
type UpdateContinualImprovementInput struct {
// Description
Description mcp.Omittable[*string] `json:"description,omitempty"`
// Continual improvement ID
ID gid.GID `json:"id"`
// Owner ID
OwnerID *gid.GID `json:"owner_id,omitempty"`
// Priority
Priority *coredata.ContinualImprovementPriority `json:"priority,omitempty"`
// Reference ID
ReferenceID *string `json:"reference_id,omitempty"`
// Source
Source mcp.Omittable[*string] `json:"source,omitempty"`
// Status
Status *coredata.ContinualImprovementStatus `json:"status,omitempty"`
// Target date
TargetDate mcp.Omittable[*time.Time] `json:"target_date,omitempty"`
}
// UpdateContinualImprovementOutput represents the schema
type UpdateContinualImprovementOutput struct {
ContinualImprovement *ContinualImprovement `json:"continual_improvement"`
}
// UpdateDatumInput represents the schema
type UpdateDatumInput struct {
// Data classification
@@ -1071,6 +1198,12 @@ type ListAssetsInputFilter struct {
SnapshotID *gid.GID `json:"snapshot_id,omitempty"`
}
// ListContinualImprovementsInputFilter represents the schema
type ListContinualImprovementsInputFilter struct {
// Snapshot ID
SnapshotID *gid.GID `json:"snapshot_id,omitempty"`
}
// ListDataInputFilter represents the schema
type ListDataInputFilter struct {
// Snapshot ID