@rashidazarang/airtable-mcp 3.1.0 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -25
- package/bin/airtable-mcp.js +12 -32
- package/dist/typescript/airtable-mcp-server.js +77 -0
- package/dist/typescript/airtable-mcp-server.js.map +1 -0
- package/dist/typescript/app/airtable-client.js +325 -0
- package/dist/typescript/app/airtable-client.js.map +1 -0
- package/dist/typescript/app/config.js +141 -0
- package/dist/typescript/app/config.js.map +1 -0
- package/dist/typescript/app/context.js +3 -0
- package/dist/typescript/app/context.js.map +1 -0
- package/dist/typescript/app/exceptions.js +85 -0
- package/dist/typescript/app/exceptions.js.map +1 -0
- package/dist/typescript/app/governance.js +58 -0
- package/dist/typescript/app/governance.js.map +1 -0
- package/dist/typescript/app/logger.js +47 -0
- package/dist/typescript/app/logger.js.map +1 -0
- package/dist/typescript/app/rateLimiter.js +37 -0
- package/dist/typescript/app/rateLimiter.js.map +1 -0
- package/dist/typescript/app/tools/create.js +54 -0
- package/dist/typescript/app/tools/create.js.map +1 -0
- package/dist/typescript/app/tools/describe.js +146 -0
- package/dist/typescript/app/tools/describe.js.map +1 -0
- package/dist/typescript/app/tools/handleError.js +54 -0
- package/dist/typescript/app/tools/handleError.js.map +1 -0
- package/dist/typescript/app/tools/index.js +24 -0
- package/dist/typescript/app/tools/index.js.map +1 -0
- package/dist/typescript/app/tools/listBases.js +52 -0
- package/dist/typescript/app/tools/listBases.js.map +1 -0
- package/dist/typescript/app/tools/listExceptions.js +18 -0
- package/dist/typescript/app/tools/listExceptions.js.map +1 -0
- package/dist/typescript/app/tools/listGovernance.js +17 -0
- package/dist/typescript/app/tools/listGovernance.js.map +1 -0
- package/dist/typescript/app/tools/query.js +126 -0
- package/dist/typescript/app/tools/query.js.map +1 -0
- package/dist/typescript/app/tools/update.js +56 -0
- package/dist/typescript/app/tools/update.js.map +1 -0
- package/dist/typescript/app/tools/upsert.js +65 -0
- package/dist/typescript/app/tools/upsert.js.map +1 -0
- package/dist/typescript/app/tools/webhooks.js +44 -0
- package/dist/typescript/app/tools/webhooks.js.map +1 -0
- package/dist/typescript/app/types.js +282 -0
- package/dist/typescript/app/types.js.map +1 -0
- package/dist/typescript/apps-sdk/mappers.js +70 -0
- package/dist/typescript/apps-sdk/mappers.js.map +1 -0
- package/dist/typescript/errors.js +75 -0
- package/dist/typescript/errors.js.map +1 -0
- package/dist/typescript/index.js +27 -0
- package/dist/typescript/index.js.map +1 -0
- package/package.json +49 -30
- package/tsconfig.json +10 -4
- package/types/typescript/airtable-mcp-server.d.ts +2 -0
- package/types/typescript/app/airtable-client.d.ts +49 -0
- package/types/typescript/app/config.d.ts +16 -0
- package/types/typescript/app/context.d.ts +12 -0
- package/types/typescript/app/exceptions.d.ts +12 -0
- package/types/typescript/app/governance.d.ts +18 -0
- package/types/typescript/app/logger.d.ts +13 -0
- package/types/typescript/app/rateLimiter.d.ts +13 -0
- package/types/typescript/app/tools/create.d.ts +3 -0
- package/types/typescript/app/tools/describe.d.ts +3 -0
- package/types/typescript/app/tools/handleError.d.ts +8 -0
- package/types/typescript/app/tools/index.d.ts +3 -0
- package/types/typescript/app/tools/listBases.d.ts +33 -0
- package/types/typescript/app/tools/listExceptions.d.ts +3 -0
- package/types/typescript/app/tools/listGovernance.d.ts +3 -0
- package/types/typescript/app/tools/query.d.ts +3 -0
- package/types/typescript/app/tools/update.d.ts +3 -0
- package/types/typescript/app/tools/upsert.d.ts +3 -0
- package/types/typescript/app/tools/webhooks.d.ts +3 -0
- package/types/typescript/app/types.d.ts +830 -0
- package/types/typescript/apps-sdk/mappers.d.ts +53 -0
- package/types/typescript/errors.d.ts +55 -0
- package/types/typescript/index.d.ts +10 -0
- package/types/typescript/prompt-templates.d.ts +5 -0
- package/types/typescript/tools-schemas.d.ts +5 -0
- package/airtable_simple.js +0 -1561
- package/airtable_simple_production.js +0 -1564
- package/dist/airtable-mcp-server.js +0 -660
- package/dist/airtable-mcp-server.js.map +0 -1
- package/dist/test-suite.js +0 -421
- package/dist/test-suite.js.map +0 -1
- package/examples/airtable-crud-example.js +0 -203
- package/examples/building-mcp.md +0 -6666
- package/examples/claude_config.json +0 -4
- package/examples/claude_simple_config.json +0 -7
- package/examples/env-demo.js +0 -172
- package/examples/example-tasks-update.json +0 -23
- package/examples/example-tasks.json +0 -26
- package/examples/example_usage.md +0 -124
- package/examples/python_debug_patch.txt +0 -27
- package/examples/sample-transform.js +0 -76
- package/examples/typescript/advanced-ai-prompts.ts +0 -447
- package/examples/typescript/basic-usage.ts +0 -174
- package/examples/typescript/claude-desktop-config.json +0 -29
- package/examples/windsurf_mcp_config.json +0 -17
- package/types/ai-prompts.d.ts +0 -321
- package/types/airtable-mcp-server.d.ts +0 -52
- package/types/index.d.ts +0 -357
- package/types/tools.d.ts +0 -514
- /package/types/{test-suite.d.ts → typescript/test-suite.d.ts} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { QueryOutput, CreateOutput, UpdateOutput } from '../app/types';
|
|
2
|
+
export declare function toInlineResultCard(table: string, result: QueryOutput): {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string | undefined;
|
|
5
|
+
columns: {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
rows: {
|
|
10
|
+
id: string;
|
|
11
|
+
}[];
|
|
12
|
+
pagination: {
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
nextOffset: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
actions: string[];
|
|
17
|
+
state: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function toFullscreenGrid(_table: string, result: QueryOutput, selection?: string[]): {
|
|
20
|
+
columns: {
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}[];
|
|
24
|
+
rows: {
|
|
25
|
+
id: string;
|
|
26
|
+
}[];
|
|
27
|
+
filters: {};
|
|
28
|
+
sorts: never[];
|
|
29
|
+
selection: string[];
|
|
30
|
+
toolbarActions: string[];
|
|
31
|
+
state: string;
|
|
32
|
+
};
|
|
33
|
+
type DiffChange = {
|
|
34
|
+
recordId: string;
|
|
35
|
+
field: string;
|
|
36
|
+
before?: unknown;
|
|
37
|
+
after?: unknown;
|
|
38
|
+
status: 'add' | 'update' | 'unchanged' | 'conflict';
|
|
39
|
+
warning?: string;
|
|
40
|
+
};
|
|
41
|
+
export declare function buildDiffModalForCreate(output: CreateOutput, idempotencyKey?: string): {
|
|
42
|
+
changes: DiffChange[];
|
|
43
|
+
idempotencyKey: string | undefined;
|
|
44
|
+
confirmAction: "create";
|
|
45
|
+
cancelAction: "close";
|
|
46
|
+
};
|
|
47
|
+
export declare function buildDiffModalForUpdate(output: UpdateOutput, idempotencyKey?: string): {
|
|
48
|
+
changes: DiffChange[];
|
|
49
|
+
idempotencyKey: string | undefined;
|
|
50
|
+
confirmAction: "update";
|
|
51
|
+
cancelAction: "close";
|
|
52
|
+
};
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error taxonomy aligned with Airtable Brain guardrails.
|
|
3
|
+
*
|
|
4
|
+
* All tool errors should use these types so the LLM can reason about
|
|
5
|
+
* retry behaviour and user messaging. Avoid leaking raw Airtable payloads
|
|
6
|
+
* through error messages.
|
|
7
|
+
*/
|
|
8
|
+
export type AirtableErrorCode = 'RateLimited' | 'ValidationError' | 'AuthError' | 'ConflictError' | 'NotFound' | 'InternalError' | 'GovernanceError';
|
|
9
|
+
export interface ErrorContext {
|
|
10
|
+
baseId?: string;
|
|
11
|
+
table?: string;
|
|
12
|
+
retryAfterMs?: number;
|
|
13
|
+
attempt?: number;
|
|
14
|
+
totalAttempts?: number;
|
|
15
|
+
upstreamErrorType?: string;
|
|
16
|
+
upstreamRequestId?: string;
|
|
17
|
+
governanceRule?: string;
|
|
18
|
+
endpoint?: string;
|
|
19
|
+
}
|
|
20
|
+
interface AirtableErrorOptions {
|
|
21
|
+
status?: number;
|
|
22
|
+
retryAfterMs?: number;
|
|
23
|
+
context?: ErrorContext;
|
|
24
|
+
cause?: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare class AirtableBrainError extends Error {
|
|
27
|
+
readonly code: AirtableErrorCode;
|
|
28
|
+
readonly status?: number;
|
|
29
|
+
readonly retryAfterMs?: number;
|
|
30
|
+
readonly context: ErrorContext;
|
|
31
|
+
constructor(code: AirtableErrorCode, message: string, options?: AirtableErrorOptions);
|
|
32
|
+
withContext(context: Partial<ErrorContext>): this;
|
|
33
|
+
}
|
|
34
|
+
export declare class RateLimitError extends AirtableBrainError {
|
|
35
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
36
|
+
}
|
|
37
|
+
export declare class AirtableValidationError extends AirtableBrainError {
|
|
38
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
39
|
+
}
|
|
40
|
+
export declare class AuthError extends AirtableBrainError {
|
|
41
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
42
|
+
}
|
|
43
|
+
export declare class ConflictError extends AirtableBrainError {
|
|
44
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
45
|
+
}
|
|
46
|
+
export declare class NotFoundError extends AirtableBrainError {
|
|
47
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
48
|
+
}
|
|
49
|
+
export declare class InternalServerError extends AirtableBrainError {
|
|
50
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
51
|
+
}
|
|
52
|
+
export declare class GovernanceError extends AirtableBrainError {
|
|
53
|
+
constructor(message: string, options?: AirtableErrorOptions);
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Airtable MCP Server - Main Export
|
|
3
|
+
*
|
|
4
|
+
* This module exports the main server functionality for programmatic use.
|
|
5
|
+
* For CLI usage, use the bin/airtable-mcp.js executable.
|
|
6
|
+
*/
|
|
7
|
+
export { start } from './airtable-mcp-server';
|
|
8
|
+
export * from './errors';
|
|
9
|
+
export type { AppConfig, AirtableAuthConfig, LogLevel } from './app/config';
|
|
10
|
+
export type { AppContext } from './app/context';
|