# Swiftype MCP

> Swiftype connects your AI client directly to enterprise search engines, letting you manage complex indexing logic without touching a web dashboard. It lets your agent run precise queries against core data sources, list all available indexes, track top user clicks, and even programmatically create or delete entire sets of documents.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** enterprise-search, site-search, indexing, search-api, data-retrieval

## Description

Swiftype gives your conversational AI the ability to act as an internal data architect for your organization's search infrastructure. Instead of opening a dozen different web portals just to check indexing status or run analytics, you let your agent interact directly with the core Swiftype endpoints. Your client can list every active index and scope, ensuring you know exactly what data exists. It handles everything from running raw queries against specific engines to tracking real-world user behavior by retrieving top searched terms and identifying high-conversion click paths. This capability moves search administration out of clunky web forms and straight into your prompt environment. By utilizing the Vinkius catalog within your agent, you gain secure, programmatic access to read, write, and audit structured data maps on demand.

## Tools

### st.create_documents
Adds new structured records, such as billing information, to your active data map.

### st.delete_documents
Permanently removes cached pages and associated metrics from the search index.

### st.list_documents
Retrieves a list of all stored metadata, tracking IDs for every document type in your system.

### st.list_domains
Verifies the limits set by the automated crawler across specific index scopes.

### st.list_engines
Identifies all active, isolated search engines bound to your platform tenant.

### st.post_search
Runs a raw query against a specific engine and returns detailed JSON results including property extraction.

### st.post_suggest
Provides predictive, spelling-tolerant suggestions for users without querying the main index.

### st.analytics_top_clicks
Finds and reports on the precise pages that receive the most clicks after a search.

### st.analytics_top_searches
Inspects internal data to discover which keywords are being searched for across your entire site.

### st.list_doc_types
Extracts the schema blueprints, showing exactly what types of data maps are supported by the system.

## Prompt Examples

**Prompt:** 
```
List all my available Swiftype search engines, then run a search for 'documentation' on the most relevant one and show me the top 3 analytics clicks it generated last week.
```

**Response:** 
```
Connecting natively to Swiftype... I found 2 engines: 'prod-store-engine' and 'internal-docs'.
Running `st.post_search` on 'internal-docs' explicitly for 'documentation'.
Found 15 documents. Now fetching CTR metrics (`st.analytics_top_clicks`)...

**Top Converging Documentation Documents**:
1. '/docs/api/endpoints' - 145 Clicks
2. '/help/getting-started' - 93 Clicks
3. '/support/auth-faqs' - 42 Clicks
```

**Prompt:** 
```
List all active engines in our Swiftype account.
```

**Response:** 
```
Scanning Elastic instances ('list_engines')...
Found 3 active engines:
1. 'Global-Help-Center' (Language: EN)
2. 'Ecommerce-Catalog-US' (Language: EN)
3. 'Internal-Company-Wiki' (Language: EN)

Let me know if you want me to index new documents into any of these.
```

**Prompt:** 
```
Run a test suggestion for 'passw' in the internal wiki engine.
```

**Response:** 
```
Executing `post_suggest` constraint on 'Internal-Company-Wiki'...
The engine suggests the following completions based on hits:
1. 'password reset policy'
2. 'password manager installation'
3. 'passport visa procedures'
```

## Capabilities

### Inspect Search Infrastructure
List all available search engines and map schema blueprints to understand what data sources are connected.

### Execute Targeted Searches
Fire complex, raw queries into specific content engines and pull back structured JSON results for immediate analysis.

### Manage Content Records
Bulk create new documents or permanently delete stale records to keep your index clean and accurate.

### Analyze User Behavior
Retrieve concrete metrics on what users are searching for most often, and which specific pages they click through after a search.

### Validate Data Integrity
Extract stored metadata to audit document types and ensure your data map adheres to established rules.

## Use Cases

### Debugging Missing Content
A Data Analyst notices search results are missing documentation for the 'billing' section. They ask their agent to first run `st.list_engines` to confirm all relevant indexes exist, then use `st.list_doc_types` to check if a billing schema was ever defined. This quickly diagnoses whether the problem is connectivity or definition.

### Optimizing Marketing Copy
A Content Manager wants to know which product pages perform best. They ask their agent to run `st.analytics_top_clicks` and instantly see a list of the top-performing pages, allowing them to rewrite titles for better SEO.

### Auditing Index Changes
A Search Architect needs to prove that old, obsolete policy documents are gone. They ask their agent to use `st.delete_documents` on a specific set of records and confirm the action using the API wrapper.

### Testing New Keywords
A developer wants to test if a new product keyword works well without committing to a change. They ask their agent to run `st.post_suggest` on the internal wiki engine, getting instant feedback on relevant completions.

## Benefits

- You get immediate visibility into site performance. Instead of manually checking a web dashboard, your agent runs `st.analytics_top_searches` to tell you what users are searching for right now.
- Manage data integrity on the fly. Need to update records? You can use `st.create_documents` or `st.delete_documents` directly through conversation, keeping your index clean.
- Understand your search scope instantly. Use `st.list_engines` to see all available isolated indexes and confirm that every required data source is connected.
- Deep dive into user conversion paths. Instead of guessing, the MCP executes `st.analytics_top_clicks` to pinpoint exactly which documents drive actual traffic.
- Audit your content structure easily. Running `st.list_doc_types` provides a schema blueprint view, ensuring new content always fits your data map rules.

## How It Works

The bottom line is that you get full, programmatic control over the entire lifecycle of your enterprise search index, without ever needing a web login.

1. You attach the Swiftype MCP to your AI client through Vinkius, specifying your API credentials for secure access.
2. Your agent then uses specific commands—like listing available engines or running a search query—to gather necessary data points.
3. The results return structured JSON data directly into your chat window, allowing your agent to summarize complex findings like top clicks and document counts.

## Frequently Asked Questions

**How do I check what search engines Swiftype can access?**
You run `st.list_engines`. This tool extracts a list of every active index bound to your account, giving you an immediate overview of all available data sources.

**Can I use st.post_search for simple keyword searches?**
Yes, `st.post_search` fires raw queries into a specific engine and returns detailed JSON results. This means you can ask complex questions that go beyond just matching keywords.

**What is the difference between st.analytics_top_searches and st.analytics_top_clicks?**
`st.analytics_top_searches` tells you what people are looking for, while `st.analytics_top_clicks` tells you which documents they actually clicked on after searching.

**How do I add new data to my index using Swiftype?**
You use the `st.create_documents` tool. This allows your agent to inject new, structured payload data into the system in bulk without you needing to upload a file.

**Does Swiftype MCP help me audit old records?**
Yes. You can use `st.list_documents` to dump all stored metadata and track IDs, helping you identify which documents are stale and need cleaning up or deletion using `st.delete_documents`.