@mcp-apps/api-tools-mcp-server
Version:
MCP server for interacting with APIs and web services
66 lines (65 loc) • 2.3 kB
TypeScript
import { z } from 'zod';
export declare const getOpenApiOperationsTool: {
name: string;
description: string;
parameters: {
schemaUrl: z.ZodString;
path: z.ZodString;
authType: z.ZodDefault<z.ZodEnum<["bearer", "basic", "interactive", "none"]>>;
authConfig: z.ZodOptional<z.ZodObject<{
token: z.ZodOptional<z.ZodString>;
username: z.ZodOptional<z.ZodString>;
password: z.ZodOptional<z.ZodString>;
clientId: z.ZodOptional<z.ZodString>;
tenantId: z.ZodOptional<z.ZodString>;
authority: z.ZodOptional<z.ZodString>;
scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
redirectUri: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
token?: string | undefined;
username?: string | undefined;
clientId?: string | undefined;
tenantId?: string | undefined;
password?: string | undefined;
authority?: string | undefined;
scopes?: string[] | undefined;
redirectUri?: string | undefined;
}, {
token?: string | undefined;
username?: string | undefined;
clientId?: string | undefined;
tenantId?: string | undefined;
password?: string | undefined;
authority?: string | undefined;
scopes?: string[] | undefined;
redirectUri?: string | undefined;
}>>;
};
handler: ({ schemaUrl, path, authType, authConfig }: {
schemaUrl: string;
path: string;
authType?: "bearer" | "basic" | "interactive" | "none";
authConfig?: {
token?: string;
username?: string;
password?: string;
clientId?: string;
tenantId?: string;
authority?: string;
scopes?: string[];
redirectUri?: string;
};
}) => Promise<{
content: {
readonly type: "text";
readonly text: string;
}[];
isError?: undefined;
} | {
content: {
readonly type: "text";
readonly text: `Error fetching OpenAPI operations: ${any}`;
}[];
isError: boolean;
}>;
};