Skip to content

Commit 4f3f1d3

Browse files
committed
ran go fmt
1 parent d92f423 commit 4f3f1d3

File tree

5 files changed

+35
-35
lines changed

5 files changed

+35
-35
lines changed

pkg/analytics/get_top_searches.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ import (
1414

1515
// GetTopSearchesParams defines the parameters for retrieving top searches.
1616
type GetTopSearchesParams struct {
17-
Index string `json:"index" jsonschema:"Index name"`
18-
ClickAnalytics *bool `json:"clickAnalytics,omitempty" jsonschema:"Whether to include metrics related to click and conversion events in the response"`
19-
RevenueAnalytics *bool `json:"revenueAnalytics,omitempty" jsonschema:"Whether to include metrics related to revenue events in the response"`
20-
StartDate string `json:"startDate,omitempty" jsonschema:"Start date of the period to analyze, in YYYY-MM-DD format"`
21-
EndDate string `json:"endDate,omitempty" jsonschema:"End date of the period to analyze, in YYYY-MM-DD format"`
22-
OrderBy string `json:"orderBy,omitempty" jsonschema:"Attribute by which to order the response items (searchCount, clickThroughRate, conversionRate, averageClickPosition)"`
23-
Direction string `json:"direction,omitempty" jsonschema:"Sorting direction of the results: asc or desc"`
24-
Limit *int `json:"limit,omitempty" jsonschema:"Number of items to return (max 1000)"`
25-
Offset *int `json:"offset,omitempty" jsonschema:"Position of the first item to return"`
26-
Tags string `json:"tags,omitempty" jsonschema:"Tags by which to segment the analytics"`
17+
Index string `json:"index" jsonschema:"Index name"`
18+
ClickAnalytics *bool `json:"clickAnalytics,omitempty" jsonschema:"Whether to include metrics related to click and conversion events in the response"`
19+
RevenueAnalytics *bool `json:"revenueAnalytics,omitempty" jsonschema:"Whether to include metrics related to revenue events in the response"`
20+
StartDate string `json:"startDate,omitempty" jsonschema:"Start date of the period to analyze, in YYYY-MM-DD format"`
21+
EndDate string `json:"endDate,omitempty" jsonschema:"End date of the period to analyze, in YYYY-MM-DD format"`
22+
OrderBy string `json:"orderBy,omitempty" jsonschema:"Attribute by which to order the response items (searchCount, clickThroughRate, conversionRate, averageClickPosition)"`
23+
Direction string `json:"direction,omitempty" jsonschema:"Sorting direction of the results: asc or desc"`
24+
Limit *int `json:"limit,omitempty" jsonschema:"Number of items to return (max 1000)"`
25+
Offset *int `json:"offset,omitempty" jsonschema:"Position of the first item to return"`
26+
Tags string `json:"tags,omitempty" jsonschema:"Tags by which to segment the analytics"`
2727
}
2828

2929
// RegisterGetTopSearches registers the get_top_searches tool with the MCP server.

pkg/querysuggestions/create_config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import (
1414

1515
// CreateConfigParams defines the parameters for creating a new Query Suggestions configuration.
1616
type CreateConfigParams struct {
17-
Region string `json:"region" jsonschema:"Analytics region (us or eu)"`
18-
IndexName string `json:"indexName" jsonschema:"Query Suggestions index name"`
19-
SourceIndices string `json:"sourceIndices" jsonschema:"JSON array of source indices configurations"`
20-
Languages *string `json:"languages,omitempty" jsonschema:"JSON array of languages or boolean for deduplicating singular and plural suggestions"`
21-
Exclude *string `json:"exclude,omitempty" jsonschema:"JSON array of words or regular expressions to exclude from the suggestions"`
22-
EnablePersonalization *bool `json:"enablePersonalization,omitempty" jsonschema:"Whether to turn on personalized query suggestions"`
23-
AllowSpecialCharacters *bool `json:"allowSpecialCharacters,omitempty" jsonschema:"Whether to include suggestions with special characters"`
17+
Region string `json:"region" jsonschema:"Analytics region (us or eu)"`
18+
IndexName string `json:"indexName" jsonschema:"Query Suggestions index name"`
19+
SourceIndices string `json:"sourceIndices" jsonschema:"JSON array of source indices configurations"`
20+
Languages *string `json:"languages,omitempty" jsonschema:"JSON array of languages or boolean for deduplicating singular and plural suggestions"`
21+
Exclude *string `json:"exclude,omitempty" jsonschema:"JSON array of words or regular expressions to exclude from the suggestions"`
22+
EnablePersonalization *bool `json:"enablePersonalization,omitempty" jsonschema:"Whether to turn on personalized query suggestions"`
23+
AllowSpecialCharacters *bool `json:"allowSpecialCharacters,omitempty" jsonschema:"Whether to include suggestions with special characters"`
2424
}
2525

2626
// RegisterCreateConfig registers the create_query_suggestions_config tool with the MCP server.

pkg/querysuggestions/update_config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import (
1414

1515
// UpdateConfigParams defines the parameters for updating a Query Suggestions configuration.
1616
type UpdateConfigParams struct {
17-
Region string `json:"region" jsonschema:"Analytics region (us or eu)"`
18-
IndexName string `json:"indexName" jsonschema:"Query Suggestions index name"`
19-
SourceIndices string `json:"sourceIndices" jsonschema:"JSON array of source indices configurations"`
20-
Languages *string `json:"languages,omitempty" jsonschema:"JSON array of languages or boolean for deduplicating singular and plural suggestions"`
21-
Exclude *string `json:"exclude,omitempty" jsonschema:"JSON array of words or regular expressions to exclude from the suggestions"`
22-
EnablePersonalization *bool `json:"enablePersonalization,omitempty" jsonschema:"Whether to turn on personalized query suggestions"`
23-
AllowSpecialCharacters *bool `json:"allowSpecialCharacters,omitempty" jsonschema:"Whether to include suggestions with special characters"`
17+
Region string `json:"region" jsonschema:"Analytics region (us or eu)"`
18+
IndexName string `json:"indexName" jsonschema:"Query Suggestions index name"`
19+
SourceIndices string `json:"sourceIndices" jsonschema:"JSON array of source indices configurations"`
20+
Languages *string `json:"languages,omitempty" jsonschema:"JSON array of languages or boolean for deduplicating singular and plural suggestions"`
21+
Exclude *string `json:"exclude,omitempty" jsonschema:"JSON array of words or regular expressions to exclude from the suggestions"`
22+
EnablePersonalization *bool `json:"enablePersonalization,omitempty" jsonschema:"Whether to turn on personalized query suggestions"`
23+
AllowSpecialCharacters *bool `json:"allowSpecialCharacters,omitempty" jsonschema:"Whether to include suggestions with special characters"`
2424
}
2525

2626
// RegisterUpdateConfig registers the update_query_suggestions_config tool with the MCP server.

pkg/recommend/batch_recommend_rules.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414

1515
// BatchRecommendRulesParams defines the parameters for batch operations on recommend rules.
1616
type BatchRecommendRulesParams struct {
17-
IndexName string `json:"indexName" jsonschema:"Name of the index on which to perform the operation"`
18-
Model string `json:"model" jsonschema:"Recommend model (related-products, bought-together, trending-facets, trending-items)"`
19-
Rules string `json:"rules" jsonschema:"JSON array of Recommend rules to create or update"`
20-
ClearExistingRules *bool `json:"clearExistingRules,omitempty" jsonschema:"Whether to replace all existing rules with the provided batch"`
17+
IndexName string `json:"indexName" jsonschema:"Name of the index on which to perform the operation"`
18+
Model string `json:"model" jsonschema:"Recommend model (related-products, bought-together, trending-facets, trending-items)"`
19+
Rules string `json:"rules" jsonschema:"JSON array of Recommend rules to create or update"`
20+
ClearExistingRules *bool `json:"clearExistingRules,omitempty" jsonschema:"Whether to replace all existing rules with the provided batch"`
2121
}
2222

2323
// RegisterBatchRecommendRules registers the batch_recommend_rules tool with the MCP server.

pkg/search/query/runquery.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import (
1616

1717
// RunQueryParams defines the parameters for running a query.
1818
type RunQueryParams struct {
19-
Query string `json:"query" jsonschema:"The query to run against the index"`
20-
IndexName string `json:"indexName,omitempty" jsonschema:"The index to search into"`
21-
HitsPerPage *int `json:"hitsPerPage,omitempty" jsonschema:"The number of hits to return per page"`
22-
Page *int `json:"page,omitempty" jsonschema:"The page number (0-based) to retrieve"`
23-
Filters string `json:"filters,omitempty" jsonschema:"The filter expression using Algolia's filter syntax (e.g., 'category:Book AND price < 100')"`
24-
Facets string `json:"facets,omitempty" jsonschema:"Comma-separated list of attributes to facet on"`
25-
RestrictSearchableAttributes string `json:"restrictSearchableAttributes,omitempty" jsonschema:"Comma-separated list of attributes to search in"`
19+
Query string `json:"query" jsonschema:"The query to run against the index"`
20+
IndexName string `json:"indexName,omitempty" jsonschema:"The index to search into"`
21+
HitsPerPage *int `json:"hitsPerPage,omitempty" jsonschema:"The number of hits to return per page"`
22+
Page *int `json:"page,omitempty" jsonschema:"The page number (0-based) to retrieve"`
23+
Filters string `json:"filters,omitempty" jsonschema:"The filter expression using Algolia's filter syntax (e.g., 'category:Book AND price < 100')"`
24+
Facets string `json:"facets,omitempty" jsonschema:"Comma-separated list of attributes to facet on"`
25+
RestrictSearchableAttributes string `json:"restrictSearchableAttributes,omitempty" jsonschema:"Comma-separated list of attributes to search in"`
2626
}
2727

2828
func RegisterRunQuery(mcps *mcp.Server, client *search.Client, index *search.Index) {

0 commit comments

Comments
 (0)