@ignitionai/azure-ai-search-mcp
Version:
Complete Azure AI Search MCP server with vector search, semantic search, and document management
508 lines (507 loc) • 15.4 kB
TypeScript
import { z } from "zod";
export declare const AzureSearchConfigSchema: z.ZodObject<{
endpoint: z.ZodString;
apiKey: z.ZodOptional<z.ZodString>;
apiVersion: z.ZodDefault<z.ZodOptional<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
endpoint?: string;
apiKey?: string;
apiVersion?: string;
}, {
endpoint?: string;
apiKey?: string;
apiVersion?: string;
}>;
export type AzureSearchConfig = z.infer<typeof AzureSearchConfigSchema>;
export declare const SearchDocumentsSchema: z.ZodObject<{
indexName: z.ZodString;
searchText: z.ZodString;
searchMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["any", "all"]>>>;
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
filter: z.ZodOptional<z.ZodString>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
top: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
skip: z.ZodOptional<z.ZodNumber>;
includeTotalCount: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
facets: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
highlightFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
highlightPreTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
highlightPostTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
minimumCoverage: z.ZodOptional<z.ZodNumber>;
queryType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["simple", "full"]>>>;
}, "strip", z.ZodTypeAny, {
filter?: string;
indexName?: string;
searchText?: string;
searchMode?: "any" | "all";
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
includeTotalCount?: boolean;
facets?: string[];
highlightFields?: string[];
highlightPreTag?: string;
highlightPostTag?: string;
minimumCoverage?: number;
queryType?: "simple" | "full";
}, {
filter?: string;
indexName?: string;
searchText?: string;
searchMode?: "any" | "all";
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
includeTotalCount?: boolean;
facets?: string[];
highlightFields?: string[];
highlightPreTag?: string;
highlightPostTag?: string;
minimumCoverage?: number;
queryType?: "simple" | "full";
}>;
export type SearchDocumentsParams = z.infer<typeof SearchDocumentsSchema>;
export declare const GetDocumentSchema: z.ZodObject<{
indexName: z.ZodString;
key: z.ZodString;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
indexName?: string;
select?: string[];
key?: string;
}, {
indexName?: string;
select?: string[];
key?: string;
}>;
export type GetDocumentParams = z.infer<typeof GetDocumentSchema>;
export declare const SuggestSchema: z.ZodObject<{
indexName: z.ZodString;
searchText: z.ZodString;
suggesterName: z.ZodString;
fuzzy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
highlightPreTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
highlightPostTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
minimumCoverage: z.ZodOptional<z.ZodNumber>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
top: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
filter: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
filter?: string;
indexName?: string;
searchText?: string;
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
highlightPreTag?: string;
highlightPostTag?: string;
minimumCoverage?: number;
suggesterName?: string;
fuzzy?: boolean;
}, {
filter?: string;
indexName?: string;
searchText?: string;
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
highlightPreTag?: string;
highlightPostTag?: string;
minimumCoverage?: number;
suggesterName?: string;
fuzzy?: boolean;
}>;
export type SuggestParams = z.infer<typeof SuggestSchema>;
export declare const AutocompleteSchema: z.ZodObject<{
indexName: z.ZodString;
searchText: z.ZodString;
suggesterName: z.ZodString;
autocompleteMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["oneTerm", "twoTerms", "oneTermWithContext"]>>>;
fuzzy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
highlightPreTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
highlightPostTag: z.ZodDefault<z.ZodOptional<z.ZodString>>;
minimumCoverage: z.ZodOptional<z.ZodNumber>;
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
top: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
filter: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
filter?: string;
indexName?: string;
searchText?: string;
searchFields?: string[];
top?: number;
highlightPreTag?: string;
highlightPostTag?: string;
minimumCoverage?: number;
suggesterName?: string;
fuzzy?: boolean;
autocompleteMode?: "oneTerm" | "twoTerms" | "oneTermWithContext";
}, {
filter?: string;
indexName?: string;
searchText?: string;
searchFields?: string[];
top?: number;
highlightPreTag?: string;
highlightPostTag?: string;
minimumCoverage?: number;
suggesterName?: string;
fuzzy?: boolean;
autocompleteMode?: "oneTerm" | "twoTerms" | "oneTermWithContext";
}>;
export type AutocompleteParams = z.infer<typeof AutocompleteSchema>;
export declare const ListIndexesSchema: z.ZodObject<{
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
select?: string[];
}, {
select?: string[];
}>;
export type ListIndexesParams = z.infer<typeof ListIndexesSchema>;
export declare const GetIndexSchema: z.ZodObject<{
indexName: z.ZodString;
}, "strip", z.ZodTypeAny, {
indexName?: string;
}, {
indexName?: string;
}>;
export type GetIndexParams = z.infer<typeof GetIndexSchema>;
export declare const GetIndexStatisticsSchema: z.ZodObject<{
indexName: z.ZodString;
}, "strip", z.ZodTypeAny, {
indexName?: string;
}, {
indexName?: string;
}>;
export type GetIndexStatisticsParams = z.infer<typeof GetIndexStatisticsSchema>;
export declare const UploadDocumentsSchema: z.ZodObject<{
indexName: z.ZodString;
documents: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
}, "strip", z.ZodTypeAny, {
indexName?: string;
documents?: Record<string, any>[];
}, {
indexName?: string;
documents?: Record<string, any>[];
}>;
export type UploadDocumentsParams = z.infer<typeof UploadDocumentsSchema>;
export declare const MergeDocumentsSchema: z.ZodObject<{
indexName: z.ZodString;
documents: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
}, "strip", z.ZodTypeAny, {
indexName?: string;
documents?: Record<string, any>[];
}, {
indexName?: string;
documents?: Record<string, any>[];
}>;
export type MergeDocumentsParams = z.infer<typeof MergeDocumentsSchema>;
export declare const DeleteDocumentsSchema: z.ZodObject<{
indexName: z.ZodString;
keyField: z.ZodString;
keyValues: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
indexName?: string;
keyField?: string;
keyValues?: string[];
}, {
indexName?: string;
keyField?: string;
keyValues?: string[];
}>;
export type DeleteDocumentsParams = z.infer<typeof DeleteDocumentsSchema>;
export interface SearchResult<T = any> {
success: boolean;
data?: {
results: T[];
count?: number;
facets?: Record<string, any[]>;
coverage?: number;
nextPageParameters?: any;
};
error?: string;
}
export interface DocumentResult<T = any> {
success: boolean;
data?: T;
error?: string;
}
export interface SuggestResult {
success: boolean;
data?: {
results: Array<{
text: string;
document: any;
}>;
coverage?: number;
};
error?: string;
}
export interface AutocompleteResult {
success: boolean;
data?: {
results: Array<{
text: string;
queryPlusText: string;
}>;
coverage?: number;
};
error?: string;
}
export interface IndexResult {
success: boolean;
data?: any;
error?: string;
}
export interface BatchResult {
success: boolean;
data?: {
results: Array<{
key: string;
status: boolean;
errorMessage?: string;
}>;
};
error?: string;
}
export declare const VectorQuerySchema: z.ZodObject<{
vector: z.ZodArray<z.ZodNumber, "many">;
fields: z.ZodString;
k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
exhaustive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}, {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}>;
export type VectorQuery = z.infer<typeof VectorQuerySchema>;
export declare const VectorSearchSchema: z.ZodObject<{
indexName: z.ZodString;
vectorQueries: z.ZodArray<z.ZodObject<{
vector: z.ZodArray<z.ZodNumber, "many">;
fields: z.ZodString;
k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
exhaustive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}, {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}>, "many">;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
filter: z.ZodOptional<z.ZodString>;
top: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
skip: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
filter?: string;
indexName?: string;
select?: string[];
top?: number;
skip?: number;
vectorQueries?: {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}[];
}, {
filter?: string;
indexName?: string;
select?: string[];
top?: number;
skip?: number;
vectorQueries?: {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}[];
}>;
export type VectorSearchParams = z.infer<typeof VectorSearchSchema>;
export declare const HybridSearchSchema: z.ZodObject<{
indexName: z.ZodString;
searchText: z.ZodString;
vectorQueries: z.ZodArray<z.ZodObject<{
vector: z.ZodArray<z.ZodNumber, "many">;
fields: z.ZodString;
k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
exhaustive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}, {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}>, "many">;
searchMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["any", "all"]>>>;
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
filter: z.ZodOptional<z.ZodString>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
top: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
skip: z.ZodOptional<z.ZodNumber>;
queryType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["simple", "full"]>>>;
}, "strip", z.ZodTypeAny, {
filter?: string;
indexName?: string;
searchText?: string;
searchMode?: "any" | "all";
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
queryType?: "simple" | "full";
vectorQueries?: {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}[];
}, {
filter?: string;
indexName?: string;
searchText?: string;
searchMode?: "any" | "all";
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
queryType?: "simple" | "full";
vectorQueries?: {
vector?: number[];
fields?: string;
k?: number;
exhaustive?: boolean;
}[];
}>;
export type HybridSearchParams = z.infer<typeof HybridSearchSchema>;
export declare const SemanticSearchSchema: z.ZodObject<{
indexName: z.ZodString;
searchText: z.ZodString;
semanticConfiguration: z.ZodString;
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
filter: z.ZodOptional<z.ZodString>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
top: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
skip: z.ZodOptional<z.ZodNumber>;
answers: z.ZodOptional<z.ZodObject<{
answerType: z.ZodDefault<z.ZodEnum<["extractive"]>>;
count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
answerType?: "extractive";
count?: number;
threshold?: number;
}, {
answerType?: "extractive";
count?: number;
threshold?: number;
}>>;
captions: z.ZodOptional<z.ZodObject<{
captionType: z.ZodDefault<z.ZodEnum<["extractive"]>>;
maxTextRecordsToProcess: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
highlight: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
captionType?: "extractive";
maxTextRecordsToProcess?: number;
highlight?: boolean;
}, {
captionType?: "extractive";
maxTextRecordsToProcess?: number;
highlight?: boolean;
}>>;
}, "strip", z.ZodTypeAny, {
filter?: string;
indexName?: string;
searchText?: string;
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
semanticConfiguration?: string;
answers?: {
answerType?: "extractive";
count?: number;
threshold?: number;
};
captions?: {
captionType?: "extractive";
maxTextRecordsToProcess?: number;
highlight?: boolean;
};
}, {
filter?: string;
indexName?: string;
searchText?: string;
searchFields?: string[];
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
semanticConfiguration?: string;
answers?: {
answerType?: "extractive";
count?: number;
threshold?: number;
};
captions?: {
captionType?: "extractive";
maxTextRecordsToProcess?: number;
highlight?: boolean;
};
}>;
export type SemanticSearchParams = z.infer<typeof SemanticSearchSchema>;
export interface VectorSearchResult<T = any> {
success: boolean;
data?: {
results: T[];
count?: number;
};
error?: string;
}
export interface SemanticSearchResult<T = any> {
success: boolean;
data?: {
results: T[];
count?: number;
answers?: Array<{
key: string;
text: string;
highlights: string;
score: number;
}>;
captions?: Array<{
text: string;
highlights: string;
}>;
};
error?: string;
}