search

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 (*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

Jump to

Keyboard shortcuts

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