@ignitionai/azure-storage-mcp
Version:
Complete Azure Storage MCP server with CRUD operations, batch processing, schema validation, and advanced querying for Azure Tables, Blobs, Service Bus Queues, and Storage Queues
562 lines (561 loc) • 20.7 kB
TypeScript
import { z } from "zod";
export declare const AzureTableConfigSchema: z.ZodObject<{
accountName: z.ZodString;
accountKey: z.ZodOptional<z.ZodString>;
tableName: z.ZodString;
connectionString: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
accountName?: string;
accountKey?: string;
tableName?: string;
connectionString?: string;
}, {
accountName?: string;
accountKey?: string;
tableName?: string;
connectionString?: string;
}>;
export type AzureTableConfig = z.infer<typeof AzureTableConfigSchema>;
export declare const TableQuerySchema: z.ZodObject<{
filter: z.ZodOptional<z.ZodString>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxResults: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
filter?: string;
select?: string[];
maxResults?: number;
}, {
filter?: string;
select?: string[];
maxResults?: number;
}>;
export type TableQuery = z.infer<typeof TableQuerySchema>;
export declare const TableEntitySchema: z.ZodRecord<z.ZodString, z.ZodAny>;
export type TableEntity = z.infer<typeof TableEntitySchema>;
export declare const ReadTableToolSchema: z.ZodObject<{
tableName: z.ZodString;
filter: z.ZodOptional<z.ZodString>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxResults: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
tableName?: string;
filter?: string;
select?: string[];
maxResults?: number;
}, {
tableName?: string;
filter?: string;
select?: string[];
maxResults?: number;
}>;
export declare const QueryTableAdvancedSchema: z.ZodObject<{
tableName: z.ZodString;
filter: z.ZodOptional<z.ZodString>;
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
orderBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
top: z.ZodOptional<z.ZodNumber>;
skip: z.ZodOptional<z.ZodNumber>;
continuationToken: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
tableName?: string;
filter?: string;
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
continuationToken?: string;
}, {
tableName?: string;
filter?: string;
select?: string[];
orderBy?: string[];
top?: number;
skip?: number;
continuationToken?: string;
}>;
export type QueryTableAdvancedParams = z.infer<typeof QueryTableAdvancedSchema>;
export type ReadTableToolParams = z.infer<typeof ReadTableToolSchema>;
export declare const CreateEntityToolSchema: z.ZodObject<{
tableName: z.ZodString;
partitionKey: z.ZodString;
rowKey: z.ZodString;
entity: z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>;
}, "strip", z.ZodTypeAny, {
tableName?: string;
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
}, {
tableName?: string;
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
}>;
export type CreateEntityToolParams = z.infer<typeof CreateEntityToolSchema>;
export declare const UpdateEntityToolSchema: z.ZodObject<{
tableName: z.ZodString;
partitionKey: z.ZodString;
rowKey: z.ZodString;
entity: z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>;
mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["merge", "replace"]>>>;
}, "strip", z.ZodTypeAny, {
tableName?: string;
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
mode?: "merge" | "replace";
}, {
tableName?: string;
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
mode?: "merge" | "replace";
}>;
export type UpdateEntityToolParams = z.infer<typeof UpdateEntityToolSchema>;
export declare const DeleteEntityToolSchema: z.ZodObject<{
tableName: z.ZodString;
partitionKey: z.ZodString;
rowKey: z.ZodString;
}, "strip", z.ZodTypeAny, {
tableName?: string;
partitionKey?: string;
rowKey?: string;
}, {
tableName?: string;
partitionKey?: string;
rowKey?: string;
}>;
export type DeleteEntityToolParams = z.infer<typeof DeleteEntityToolSchema>;
export declare const BatchCreateEntitiesSchema: z.ZodObject<{
tableName: z.ZodString;
entities: z.ZodArray<z.ZodObject<{
partitionKey: z.ZodString;
rowKey: z.ZodString;
entity: z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>;
}, "strip", z.ZodTypeAny, {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
}, {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
}>, "many">;
}, "strip", z.ZodTypeAny, {
tableName?: string;
entities?: {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
}[];
}, {
tableName?: string;
entities?: {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
}[];
}>;
export type BatchCreateEntitiesParams = z.infer<typeof BatchCreateEntitiesSchema>;
export declare const BatchUpdateEntitiesSchema: z.ZodObject<{
tableName: z.ZodString;
entities: z.ZodArray<z.ZodObject<{
partitionKey: z.ZodString;
rowKey: z.ZodString;
entity: z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodEffects<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodNull]>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>, Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>>;
mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["merge", "replace"]>>>;
}, "strip", z.ZodTypeAny, {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
mode?: "merge" | "replace";
}, {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
mode?: "merge" | "replace";
}>, "many">;
}, "strip", z.ZodTypeAny, {
tableName?: string;
entities?: {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
mode?: "merge" | "replace";
}[];
}, {
tableName?: string;
entities?: {
partitionKey?: string;
rowKey?: string;
entity?: Record<string, string | number | boolean | Date | Uint8Array<ArrayBuffer>>;
mode?: "merge" | "replace";
}[];
}>;
export type BatchUpdateEntitiesParams = z.infer<typeof BatchUpdateEntitiesSchema>;
export declare const BatchDeleteEntitiesSchema: z.ZodObject<{
tableName: z.ZodString;
entities: z.ZodArray<z.ZodObject<{
partitionKey: z.ZodString;
rowKey: z.ZodString;
}, "strip", z.ZodTypeAny, {
partitionKey?: string;
rowKey?: string;
}, {
partitionKey?: string;
rowKey?: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
tableName?: string;
entities?: {
partitionKey?: string;
rowKey?: string;
}[];
}, {
tableName?: string;
entities?: {
partitionKey?: string;
rowKey?: string;
}[];
}>;
export type BatchDeleteEntitiesParams = z.infer<typeof BatchDeleteEntitiesSchema>;
export declare const CreateTableSchema: z.ZodObject<{
tableName: z.ZodString;
}, "strip", z.ZodTypeAny, {
tableName?: string;
}, {
tableName?: string;
}>;
export type CreateTableParams = z.infer<typeof CreateTableSchema>;
export declare const DeleteTableSchema: z.ZodObject<{
tableName: z.ZodString;
}, "strip", z.ZodTypeAny, {
tableName?: string;
}, {
tableName?: string;
}>;
export type DeleteTableParams = z.infer<typeof DeleteTableSchema>;
export declare const AzureBlobConfigSchema: z.ZodEffects<z.ZodObject<{
accountName: z.ZodOptional<z.ZodString>;
connectionString: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
accountName?: string;
connectionString?: string;
}, {
accountName?: string;
connectionString?: string;
}>, {
accountName?: string;
connectionString?: string;
}, {
accountName?: string;
connectionString?: string;
}>;
export type AzureBlobConfig = z.infer<typeof AzureBlobConfigSchema>;
export declare const CreateContainerSchema: z.ZodObject<{
containerName: z.ZodString;
publicAccess: z.ZodOptional<z.ZodEnum<["container", "blob"]>>;
}, "strip", z.ZodTypeAny, {
containerName?: string;
publicAccess?: "container" | "blob";
}, {
containerName?: string;
publicAccess?: "container" | "blob";
}>;
export type CreateContainerParams = z.infer<typeof CreateContainerSchema>;
export declare const DeleteContainerSchema: z.ZodObject<{
containerName: z.ZodString;
}, "strip", z.ZodTypeAny, {
containerName?: string;
}, {
containerName?: string;
}>;
export type DeleteContainerParams = z.infer<typeof DeleteContainerSchema>;
export declare const ListBlobsSchema: z.ZodObject<{
containerName: z.ZodString;
prefix: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
containerName?: string;
prefix?: string;
}, {
containerName?: string;
prefix?: string;
}>;
export type ListBlobsParams = z.infer<typeof ListBlobsSchema>;
export declare const UploadBlobSchema: z.ZodObject<{
containerName: z.ZodString;
blobName: z.ZodString;
content: z.ZodString;
contentType: z.ZodOptional<z.ZodString>;
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
overwrite: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
containerName?: string;
blobName?: string;
content?: string;
contentType?: string;
metadata?: Record<string, string>;
overwrite?: boolean;
}, {
containerName?: string;
blobName?: string;
content?: string;
contentType?: string;
metadata?: Record<string, string>;
overwrite?: boolean;
}>;
export type UploadBlobParams = z.infer<typeof UploadBlobSchema>;
export declare const DownloadBlobSchema: z.ZodObject<{
containerName: z.ZodString;
blobName: z.ZodString;
}, "strip", z.ZodTypeAny, {
containerName?: string;
blobName?: string;
}, {
containerName?: string;
blobName?: string;
}>;
export type DownloadBlobParams = z.infer<typeof DownloadBlobSchema>;
export declare const DeleteBlobSchema: z.ZodObject<{
containerName: z.ZodString;
blobName: z.ZodString;
}, "strip", z.ZodTypeAny, {
containerName?: string;
blobName?: string;
}, {
containerName?: string;
blobName?: string;
}>;
export type DeleteBlobParams = z.infer<typeof DeleteBlobSchema>;
export declare const GetBlobPropertiesSchema: z.ZodObject<{
containerName: z.ZodString;
blobName: z.ZodString;
}, "strip", z.ZodTypeAny, {
containerName?: string;
blobName?: string;
}, {
containerName?: string;
blobName?: string;
}>;
export type GetBlobPropertiesParams = z.infer<typeof GetBlobPropertiesSchema>;
export declare const AzureQueueConfigSchema: z.ZodEffects<z.ZodObject<{
namespaceName: z.ZodOptional<z.ZodString>;
connectionString: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
connectionString?: string;
namespaceName?: string;
}, {
connectionString?: string;
namespaceName?: string;
}>, {
connectionString?: string;
namespaceName?: string;
}, {
connectionString?: string;
namespaceName?: string;
}>;
export type AzureQueueConfig = z.infer<typeof AzureQueueConfigSchema>;
export declare const CreateQueueSchema: z.ZodObject<{
queueName: z.ZodString;
maxSizeInMegabytes: z.ZodOptional<z.ZodNumber>;
defaultMessageTimeToLive: z.ZodOptional<z.ZodString>;
lockDuration: z.ZodOptional<z.ZodString>;
requiresDuplicateDetection: z.ZodOptional<z.ZodBoolean>;
requiresSession: z.ZodOptional<z.ZodBoolean>;
deadLetteringOnMessageExpiration: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
maxSizeInMegabytes?: number;
defaultMessageTimeToLive?: string;
lockDuration?: string;
requiresDuplicateDetection?: boolean;
requiresSession?: boolean;
deadLetteringOnMessageExpiration?: boolean;
}, {
queueName?: string;
maxSizeInMegabytes?: number;
defaultMessageTimeToLive?: string;
lockDuration?: string;
requiresDuplicateDetection?: boolean;
requiresSession?: boolean;
deadLetteringOnMessageExpiration?: boolean;
}>;
export type CreateQueueParams = z.infer<typeof CreateQueueSchema>;
export declare const DeleteQueueSchema: z.ZodObject<{
queueName: z.ZodString;
}, "strip", z.ZodTypeAny, {
queueName?: string;
}, {
queueName?: string;
}>;
export type DeleteQueueParams = z.infer<typeof DeleteQueueSchema>;
export declare const SendMessageSchema: z.ZodObject<{
queueName: z.ZodString;
messageBody: z.ZodString;
messageId: z.ZodOptional<z.ZodString>;
correlationId: z.ZodOptional<z.ZodString>;
label: z.ZodOptional<z.ZodString>;
timeToLive: z.ZodOptional<z.ZodNumber>;
sessionId: z.ZodOptional<z.ZodString>;
userProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
messageBody?: string;
messageId?: string;
correlationId?: string;
label?: string;
timeToLive?: number;
sessionId?: string;
userProperties?: Record<string, any>;
}, {
queueName?: string;
messageBody?: string;
messageId?: string;
correlationId?: string;
label?: string;
timeToLive?: number;
sessionId?: string;
userProperties?: Record<string, any>;
}>;
export type SendMessageParams = z.infer<typeof SendMessageSchema>;
export declare const ReceiveMessageSchema: z.ZodObject<{
queueName: z.ZodString;
maxMessageCount: z.ZodOptional<z.ZodNumber>;
maxWaitTimeInMs: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
maxMessageCount?: number;
maxWaitTimeInMs?: number;
}, {
queueName?: string;
maxMessageCount?: number;
maxWaitTimeInMs?: number;
}>;
export type ReceiveMessageParams = z.infer<typeof ReceiveMessageSchema>;
export declare const PeekMessageSchema: z.ZodObject<{
queueName: z.ZodString;
maxMessageCount: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
maxMessageCount?: number;
}, {
queueName?: string;
maxMessageCount?: number;
}>;
export type PeekMessageParams = z.infer<typeof PeekMessageSchema>;
export declare const GetQueuePropertiesSchema: z.ZodObject<{
queueName: z.ZodString;
}, "strip", z.ZodTypeAny, {
queueName?: string;
}, {
queueName?: string;
}>;
export type GetQueuePropertiesParams = z.infer<typeof GetQueuePropertiesSchema>;
export declare const AzureStorageQueueConfigSchema: z.ZodEffects<z.ZodObject<{
accountName: z.ZodOptional<z.ZodString>;
connectionString: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
accountName?: string;
connectionString?: string;
}, {
accountName?: string;
connectionString?: string;
}>, {
accountName?: string;
connectionString?: string;
}, {
accountName?: string;
connectionString?: string;
}>;
export type AzureStorageQueueConfig = z.infer<typeof AzureStorageQueueConfigSchema>;
export declare const CreateStorageQueueSchema: z.ZodObject<{
queueName: z.ZodString;
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
metadata?: Record<string, string>;
queueName?: string;
}, {
metadata?: Record<string, string>;
queueName?: string;
}>;
export type CreateStorageQueueParams = z.infer<typeof CreateStorageQueueSchema>;
export declare const DeleteStorageQueueSchema: z.ZodObject<{
queueName: z.ZodString;
}, "strip", z.ZodTypeAny, {
queueName?: string;
}, {
queueName?: string;
}>;
export type DeleteStorageQueueParams = z.infer<typeof DeleteStorageQueueSchema>;
export declare const SendStorageMessageSchema: z.ZodObject<{
queueName: z.ZodString;
messageText: z.ZodString;
visibilityTimeoutInSeconds: z.ZodOptional<z.ZodNumber>;
messageTimeToLiveInSeconds: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
messageText?: string;
visibilityTimeoutInSeconds?: number;
messageTimeToLiveInSeconds?: number;
}, {
queueName?: string;
messageText?: string;
visibilityTimeoutInSeconds?: number;
messageTimeToLiveInSeconds?: number;
}>;
export type SendStorageMessageParams = z.infer<typeof SendStorageMessageSchema>;
export declare const ReceiveStorageMessagesSchema: z.ZodObject<{
queueName: z.ZodString;
numberOfMessages: z.ZodOptional<z.ZodNumber>;
visibilityTimeoutInSeconds: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
visibilityTimeoutInSeconds?: number;
numberOfMessages?: number;
}, {
queueName?: string;
visibilityTimeoutInSeconds?: number;
numberOfMessages?: number;
}>;
export type ReceiveStorageMessagesParams = z.infer<typeof ReceiveStorageMessagesSchema>;
export declare const PeekStorageMessagesSchema: z.ZodObject<{
queueName: z.ZodString;
numberOfMessages: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
queueName?: string;
numberOfMessages?: number;
}, {
queueName?: string;
numberOfMessages?: number;
}>;
export type PeekStorageMessagesParams = z.infer<typeof PeekStorageMessagesSchema>;
export declare const DeleteStorageMessageSchema: z.ZodObject<{
queueName: z.ZodString;
messageId: z.ZodString;
popReceipt: z.ZodString;
}, "strip", z.ZodTypeAny, {
queueName?: string;
messageId?: string;
popReceipt?: string;
}, {
queueName?: string;
messageId?: string;
popReceipt?: string;
}>;
export type DeleteStorageMessageParams = z.infer<typeof DeleteStorageMessageSchema>;
export declare const GetStorageQueuePropertiesSchema: z.ZodObject<{
queueName: z.ZodString;
}, "strip", z.ZodTypeAny, {
queueName?: string;
}, {
queueName?: string;
}>;
export type GetStorageQueuePropertiesParams = z.infer<typeof GetStorageQueuePropertiesSchema>;
export declare const ClearStorageQueueSchema: z.ZodObject<{
queueName: z.ZodString;
}, "strip", z.ZodTypeAny, {
queueName?: string;
}, {
queueName?: string;
}>;
export type ClearStorageQueueParams = z.infer<typeof ClearStorageQueueSchema>;