Skip to main content
Glama

metoro-mcp-server

Official
by metoro-io
update_ai_issue.go1.88 kB
package tools import ( "bytes" "context" "encoding/json" "fmt" mcpgolang "github.com/metoro-io/mcp-golang" "github.com/metoro-io/metoro-mcp-server/model" "github.com/metoro-io/metoro-mcp-server/utils" ) type UpdateAIIssueHandlerArgs struct { IssueUUID string `json:"issueUuid" jsonschema:"required,description=UUID of the AI issue to update"` Title *string `json:"title,omitempty" jsonschema:"description=Optional new title for the AI issue"` Description *string `json:"description,omitempty" jsonschema:"description=Optional new description for the AI issue"` Summary *string `json:"summary,omitempty" jsonschema:"description=Optional new summary for the AI issue"` Open *bool `json:"open,omitempty" jsonschema:"description=Optional flag to set whether the AI issue is open (true) or resolved (false)"` } func UpdateAIIssueHandler(ctx context.Context, arguments UpdateAIIssueHandlerArgs) (*mcpgolang.ToolResponse, error) { if arguments.Title == nil && arguments.Description == nil && arguments.Summary == nil && arguments.Open == nil { return nil, fmt.Errorf("at least one of title, description, summary, or open must be provided to update an AI issue") } request := model.UpdateAIIssueRequest{ Title: arguments.Title, Description: arguments.Description, Summary: arguments.Summary, Open: arguments.Open, } requestBody, err := json.Marshal(request) if err != nil { return nil, fmt.Errorf("failed to marshal request: %w", err) } endpoint := fmt.Sprintf("aiIssue?uuid=%s", arguments.IssueUUID) responseBody, err := utils.MakeMetoroAPIRequest("PUT", endpoint, bytes.NewBuffer(requestBody), utils.GetAPIRequirementsFromRequest(ctx)) if err != nil { return nil, fmt.Errorf("failed to update AI issue: %w", err) } return mcpgolang.NewToolResponse(mcpgolang.NewTextContent(string(responseBody))), nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metoro-io/metoro-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server