tools

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package tools defines the interfaces and data structures for the ProjectMemory service.

Index

Constants

View Source
const (
	// ToolSaveContext is the name of the save_context MCP tool
	ToolSaveContext = "save_context"

	// ToolRetrieveContext is the name of the retrieve_context MCP tool
	ToolRetrieveContext = "retrieve_context"

	// ToolDeleteContext is the name of the delete_context MCP tool
	ToolDeleteContext = "delete_context"

	// ToolClearAllContext is the name of the clear_all_context MCP tool
	ToolClearAllContext = "clear_all_context"

	// ToolReplaceContext is the name of the replace_context MCP tool
	ToolReplaceContext = "replace_context"

	// DefaultRetrieveLimit is the default number of results to return
	// when no limit is specified in a retrieve_context request
	DefaultRetrieveLimit = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClearAllContextRequest

type ClearAllContextRequest struct {
	// Confirmation is a required field to confirm the operation
	// Must be set to "confirm" to prevent accidental clearing
	Confirmation string `json:"confirmation"`
}

ClearAllContextRequest defines the input schema for clear_all_context tool

type ClearAllContextResponse

type ClearAllContextResponse struct {
	// Status indicates the result of the operation ("success" or "error")
	Status string `json:"status"`

	// DeletedCount contains the number of entries that were deleted
	DeletedCount int `json:"deleted_count,omitempty"`

	// Error contains an error message if Status is "error"
	Error string `json:"error,omitempty"`
}

ClearAllContextResponse defines the output schema for clear_all_context tool

type DeleteContextRequest

type DeleteContextRequest struct {
	// ID is the unique identifier of the context entry to delete
	ID string `json:"id"`
}

DeleteContextRequest defines the input schema for delete_context tool

type DeleteContextResponse

type DeleteContextResponse struct {
	// Status indicates the result of the operation ("success" or "error")
	Status string `json:"status"`

	// Error contains an error message if Status is "error"
	Error string `json:"error,omitempty"`
}

DeleteContextResponse defines the output schema for delete_context tool

type ReplaceContextRequest

type ReplaceContextRequest struct {
	// ID is the unique identifier of the context entry to replace
	ID string `json:"id"`

	// ContextText is the new text to replace the existing context
	ContextText string `json:"context_text"`
}

ReplaceContextRequest defines the input schema for replace_context tool

type ReplaceContextResponse

type ReplaceContextResponse struct {
	// Status indicates the result of the operation ("success" or "error")
	Status string `json:"status"`

	// Error contains an error message if Status is "error"
	Error string `json:"error,omitempty"`
}

ReplaceContextResponse defines the output schema for replace_context tool

type RetrieveContextRequest

type RetrieveContextRequest struct {
	// Query is the text to search for in the context store
	Query string `json:"query"`

	// Limit is the maximum number of results to return
	// If not specified, DefaultRetrieveLimit will be used
	Limit int `json:"limit,omitempty"`
}

RetrieveContextRequest defines the input schema for retrieve_context tool

type RetrieveContextResponse

type RetrieveContextResponse struct {
	// Status indicates the result of the operation ("success" or "error")
	Status string `json:"status"`

	// Results contains the matching context entries
	Results []string `json:"results"`

	// Error contains an error message if Status is "error"
	Error string `json:"error,omitempty"`
}

RetrieveContextResponse defines the output schema for retrieve_context tool

type SaveContextRequest

type SaveContextRequest struct {
	// ContextText is the text to save in the context store
	ContextText string `json:"context_text"`
}

SaveContextRequest defines the input schema for save_context tool

type SaveContextResponse

type SaveContextResponse struct {
	// Status indicates the result of the operation ("success" or "error")
	Status string `json:"status"`

	// ID is the unique identifier assigned to the saved context
	ID string `json:"id"`

	// Error contains an error message if Status is "error"
	Error string `json:"error,omitempty"`
}

SaveContextResponse defines the output schema for save_context tool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL