mcp-quickbase
Version:
Work with Quickbase via Model Context Protocol
143 lines (142 loc) • 3.33 kB
TypeScript
import { BaseTool } from '../base';
import { QuickbaseClient } from '../../client/quickbase';
/**
* Field definition for table creation
*/
export interface FieldDefinition {
/**
* Name of the field
*/
name: string;
/**
* Type of the field (e.g., text, number, date)
*/
type: string;
/**
* Description of the field
*/
description?: string;
/**
* Additional field properties
*/
properties?: Record<string, any>;
}
/**
* Parameters for create_table tool
*/
export interface CreateTableParams {
/**
* The ID of the application
*/
app_id: string;
/**
* Name of the table
*/
name: string;
/**
* Description of the table
*/
description?: string;
/**
* Initial fields to create with the table
*/
fields?: FieldDefinition[];
/**
* Additional options for table creation
*/
options?: Record<string, any>;
}
/**
* Response from creating a table
*/
export interface CreateTableResult {
/**
* The ID of the created table
*/
tableId: string;
/**
* The name of the created table
*/
name: string;
/**
* The description of the created table
*/
description?: string;
/**
* Information about created fields
*/
fields?: Record<string, any>[];
/**
* The date the table was created
*/
created?: string;
/**
* Additional details returned from the API
*/
[key: string]: any;
}
/**
* Tool for creating a new table in a Quickbase application
*/
export declare class CreateTableTool extends BaseTool<CreateTableParams, CreateTableResult> {
name: string;
description: string;
/**
* Parameter schema for create_table
*/
paramSchema: {
type: string;
properties: {
app_id: {
type: string;
description: string;
};
name: {
type: string;
description: string;
};
description: {
type: string;
description: string;
};
fields: {
type: string;
description: string;
items: {
type: string;
properties: {
name: {
type: string;
};
type: {
type: string;
};
description: {
type: string;
};
properties: {
type: string;
};
};
required: string[];
};
};
options: {
type: string;
description: string;
};
};
required: string[];
};
/**
* Constructor
* @param client Quickbase client
*/
constructor(client: QuickbaseClient);
/**
* Run the create_table tool
* @param params Tool parameters
* @returns Created table details
*/
protected run(params: CreateTableParams): Promise<CreateTableResult>;
}