n8n
Version:
n8n Workflow Automation Tool
41 lines (40 loc) • 1.39 kB
TypeScript
import type { User } from '@n8n/db';
import z from 'zod';
import type { CredentialsService } from '../../../credentials/credentials.service';
import type { Telemetry } from '../../../telemetry';
import type { ToolDefinition } from '../mcp.types';
declare const inputSchema: {
limit: z.ZodOptional<z.ZodNumber>;
query: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodString>;
projectId: z.ZodOptional<z.ZodString>;
onlySharedWithMe: z.ZodOptional<z.ZodBoolean>;
};
export type ListCredentialsParams = {
limit?: number;
query?: string;
type?: string;
projectId?: string;
onlySharedWithMe?: boolean;
};
export type ListCredentialsItem = {
id: string;
name: string;
type: string;
scopes: string[];
isManaged: boolean;
isGlobal: boolean;
homeProject: {
id: string;
name: string;
type: string;
} | null;
};
export type ListCredentialsResult = {
data: ListCredentialsItem[];
count: number;
error?: string;
};
export declare const createListCredentialsTool: (user: User, credentialsService: CredentialsService, telemetry: Telemetry) => ToolDefinition<typeof inputSchema>;
export declare function listCredentials(user: User, credentialsService: CredentialsService, { limit, query, type, projectId, onlySharedWithMe }: ListCredentialsParams): Promise<ListCredentialsResult>;
export {};