Documentation
¶
Index ¶
- Constants
- type FilterResult
- type SearchEntitiesParams
- type SearchEntitiesResult
- type SearchTool
- func (t *SearchTool) Definition() mcp.Tool
- func (t *SearchTool) Handle(ctx context.Context, req mcp.CallToolRequest, params SearchEntitiesParams) (SearchEntitiesResult, error)
- func (t *SearchTool) Handler() server.ToolHandlerFunc
- func (t *SearchTool) HasUntrustedData() bool
- func (t *SearchTool) Name() string
- func (t *SearchTool) ValidateParams(params *SearchEntitiesParams) error
- func (t *SearchTool) ValidatePermissions(ctx context.Context, params SearchEntitiesParams) error
Constants ¶
View Source
const SearchEntitiesToolDescription = `` /* 1511-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterResult ¶
type FilterResult struct {
RawFilters map[string]interface{} `` /* 286-byte string literal not displayed */
SortBy string `json:"sort_by" jsonschema_description:"Column to sort the results by."`
SortOrder string `json:"sort_order" jsonschema_description:"Sort order ('asc' for ascending, 'desc' for descending)."`
NumResults int `json:"num_results" jsonschema_description:"Number of results to return. Default is 10."`
KeptColumns []string `json:"kept_columns" jsonschema_description:"List of columns to keep in the output. Default is ['_id', 'title', 'url']"`
ExtraData []string `json:"extra_data" jsonschema_description:"List of additional data fields to include in the output."`
AdditionalQueries []string `` /* 137-byte string literal not displayed */
}
Query parsing - internal helper struct
type SearchEntitiesParams ¶ added in v0.3.1
type SearchEntitiesParams struct {
EntityType string `` /* 204-byte string literal not displayed */
Query string `` /* 425-byte string literal not displayed */
SortBy string `` /* 160-byte string literal not displayed */
SortOrder string `` /* 146-byte string literal not displayed */
Limit int `` /* 145-byte string literal not displayed */
ExtraColumns []string `` /* 287-byte string literal not displayed */
ExtraData []string `` /* 190-byte string literal not displayed */
AdditionalQueries []string `` /* 387-byte string literal not displayed */
Count bool `` /* 136-byte string literal not displayed */
}
type SearchEntitiesResult ¶ added in v0.3.1
type SearchEntitiesResult struct {
Count int `json:"count"`
CountOnly bool `json:"countOnly"`
EntityType string `json:"entityType"`
Results []map[string]interface{} `json:"results,omitempty"`
RawFilters map[string]interface{} `json:"rawFilters"`
}
func NewSearchEntitiesResult ¶ added in v0.3.1
func NewSearchEntitiesResult(results []map[string]interface{}, params SearchEntitiesParams, filters map[string]interface{}) (SearchEntitiesResult, error)
type SearchTool ¶
type SearchTool struct{}
func NewSearchTool ¶
func NewSearchTool() *SearchTool
func (*SearchTool) Definition ¶
func (t *SearchTool) Definition() mcp.Tool
func (*SearchTool) Handle ¶
func (t *SearchTool) Handle(ctx context.Context, req mcp.CallToolRequest, params SearchEntitiesParams) (SearchEntitiesResult, error)
func (*SearchTool) Handler ¶ added in v0.3.1
func (t *SearchTool) Handler() server.ToolHandlerFunc
func (*SearchTool) HasUntrustedData ¶ added in v0.3.4
func (t *SearchTool) HasUntrustedData() bool
func (*SearchTool) Name ¶ added in v0.3.1
func (t *SearchTool) Name() string
func (*SearchTool) ValidateParams ¶ added in v0.3.1
func (t *SearchTool) ValidateParams(params *SearchEntitiesParams) error
func (*SearchTool) ValidatePermissions ¶ added in v0.3.1
func (t *SearchTool) ValidatePermissions(ctx context.Context, params SearchEntitiesParams) error
Click to show internal directories.
Click to hide internal directories.