Algolia MCP by usefulapi

v1.2.1
io.usefulapi/algolia Checked 2 days ago Published 1 day ago

Search indices, read records and synonyms, and add, change or delete records in Algolia.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

algolia_list_indices List indices

List the indices in the Algolia application with their entry counts, sizes and update times. Good first call. Algolia API: GET /1/indexes.

ParameterTypeDescription
hitsPerPageintegerResults per page (0–1000; 0 returns counts only).
pageintegerPage number, starting at 0.

algolia_search_index Search an index

Search one index and return the matching records (hits) with highlights and facets when requested. Up to 1,000 hits; use paging for more. Algolia API: POST /1/indexes/{indexName}/query.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
filtersstringFilter expression, for example "brand:Apple AND price < 500".
hitsPerPageintegerResults per page (0–1000; 0 returns counts only).
pageintegerPage number, starting at 0.
paramsobjectOther Algolia search parameters as an object, for example { attributesToRetrieve, facets, facetFilters }.
querystringText to search for.

algolia_search_facet_values Search facet values

Search the values of one facet in an index, for example brand names that start with "App". Algolia API: POST /1/indexes/{indexName}/facets/{facetName}/query.

ParameterTypeDescription
facetName *stringFacet attribute name, for example "brand".
facetQuery *stringText to match inside the facet values.
indexName *stringIndex name (from algolia_list_indices).
paramsobjectOther Algolia search parameters as an object, for example { attributesToRetrieve, facets, facetFilters }.

algolia_get_object Get a record

Get one record by objectID, optionally with only some attributes. Algolia API: GET /1/indexes/{indexName}/{objectID}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
objectID *stringThe record's objectID.
attributesToRetrievearrayAttribute names to return (default: all).

algolia_get_objects Get several records

Get up to 1,000 records by objectID across indices in one call. Algolia API: POST /1/indexes/*/objects.

ParameterTypeDescription
requests *arrayThe records to fetch.

algolia_get_settings Get index settings

Get an index's settings: searchable and facet attributes, ranking, typo tolerance and more. Algolia API: GET /1/indexes/{indexName}/settings.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).

algolia_search_synonyms Search synonyms

Search the synonyms of an index. Algolia API: POST /1/indexes/{indexName}/synonyms/search.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
hitsPerPageintegerResults per page (0–1000; 0 returns counts only).
pageintegerPage number, starting at 0.
querystringText to search for.
typestringLimit to one synonym type.

algolia_get_synonym Get a synonym

Get one synonym by objectID. Algolia API: GET /1/indexes/{indexName}/synonyms/{objectID}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
objectID *stringThe record's objectID.

algolia_search_rules Search rules

Search the query rules of an index (rules that change results for matching queries or contexts). Algolia API: POST /1/indexes/{indexName}/rules/search.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
anchoringstringMatch type of the rule's pattern.
contextstringLimit to rules with this context.
enabledbooleanOnly enabled (true) or disabled (false) rules.
hitsPerPageintegerResults per page (0–1000; 0 returns counts only).
pageintegerPage number, starting at 0.
querystringText to search for.

algolia_get_rule Get a rule

Get one query rule by objectID. Algolia API: GET /1/indexes/{indexName}/rules/{objectID}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
objectID *stringThe record's objectID.

algolia_get_task Check a write task

Check whether an index write (returned as taskID) is published yet. Algolia API: GET /1/indexes/{indexName}/task/{taskID}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
taskID *A taskID from a write response.

algolia_get_logs Get API logs

Get the last seven days of API log entries (queries, indexing, errors), newest first. Needs a key with the logs permission. Algolia API: GET /1/logs.

ParameterTypeDescription
indexNamestringOnly logs for this index.
lengthintegerNumber of entries (1–1000).
offsetintegerFirst entry to return (newest is 0).
typestringType of log entry (default all).

algolia_save_object Add a record

Add a new record with an auto-generated objectID. Changes the index. Returns the new objectID and a taskID. Algolia API: POST /1/indexes/{indexName}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
record *objectThe record as a JSON object.

algolia_add_or_replace_object Add or replace a record

Add a record with this objectID, or replace the whole existing record. Replacing drops attributes not sent. Changes the index. Algolia API: PUT /1/indexes/{indexName}/{objectID}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
objectID *stringThe record's objectID.
record *objectThe record as a JSON object.

algolia_partial_update_object Update some attributes of a record

Change only the given attributes of one record and keep the rest. Changes the index. Algolia API: POST /1/indexes/{indexName}/{objectID}/partial.

ParameterTypeDescription
attributes *objectThe attributes to set, for example { price: 399 }.
indexName *stringIndex name (from algolia_list_indices).
objectID *stringThe record's objectID.
createIfNotExistsbooleanCreate the record when it does not exist (default false).

algolia_delete_object Delete a record

Delete one record by objectID. The record is removed from search results after the returned taskID completes. Algolia API: DELETE /1/indexes/{indexName}/{objectID}.

ParameterTypeDescription
indexName *stringIndex name (from algolia_list_indices).
objectID *stringThe record's objectID.