UNPKG

mcp-quickbase

Version:

Work with Quickbase via Model Context Protocol

122 lines (121 loc) 2.8 kB
import { BaseTool } from '../base'; import { QuickbaseClient } from '../../client/quickbase'; /** * Field property definitions for various field types */ export interface FieldProperties { maxLength?: number; defaultValue?: string | number; precision?: number; format?: string; choices?: { label: string; value: string; }[]; targetTableId?: string; targetFieldId?: string; appearsByDefault?: boolean; findEnabled?: boolean; [key: string]: any; } /** * Parameters for create_field tool */ export interface CreateFieldParams { /** * ID of the table to create the field in */ table_id: string; /** * Name of the field */ field_name: string; /** * Type of the field (e.g., text, numeric, date, etc.) */ field_type: string; /** * Description of the field */ description?: string; /** * Additional options and properties for the field */ options?: FieldProperties; } /** * Response from creating a field */ export interface CreateFieldResult { /** * The ID of the created field */ fieldId: string; /** * The label/name of the created field */ label: string; /** * The type of the created field */ fieldType: string; /** * The description of the created field */ description?: string; /** * The ID of the table the field was created in */ tableId: string; /** * Additional details about the created field */ [key: string]: any; } /** * Tool for creating a new field in a Quickbase table */ export declare class CreateFieldTool extends BaseTool<CreateFieldParams, CreateFieldResult> { name: string; description: string; /** * Parameter schema for create_field */ paramSchema: { type: string; properties: { table_id: { type: string; description: string; }; field_name: { type: string; description: string; }; field_type: { type: string; description: string; }; description: { type: string; description: string; }; options: { type: string; description: string; }; }; required: string[]; }; /** * Constructor * @param client Quickbase client */ constructor(client: QuickbaseClient); /** * Run the create_field tool * @param params Tool parameters * @returns Created field details */ protected run(params: CreateFieldParams): Promise<CreateFieldResult>; }