firecrawl-mcp 3.29.1 → 3.30.1
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 +14 -51
- package/dist/index.js +118 -242
- package/dist/server.d.ts +28 -6
- package/dist/server.js +109 -236
- package/package.json +1 -1
- package/dist/agent-hints.js +0 -46
package/dist/server.d.ts
CHANGED
|
@@ -88,7 +88,6 @@ declare const searchOutputSchema: z.ZodObject<{
|
|
|
88
88
|
tools: z.ZodOptional<z.ZodUnknown>;
|
|
89
89
|
nextTool: z.ZodOptional<z.ZodUnknown>;
|
|
90
90
|
feedbackTool: z.ZodOptional<z.ZodUnknown>;
|
|
91
|
-
agent_hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
91
|
}, z.core.$strip>;
|
|
93
92
|
|
|
94
93
|
declare function removeEmptyTopLevel<T extends Record<string, any>>(obj: T): Partial<T>;
|
|
@@ -99,8 +98,6 @@ declare const searchToolBaseFields: {
|
|
|
99
98
|
full: "full";
|
|
100
99
|
}>>;
|
|
101
100
|
query: z.ZodString;
|
|
102
|
-
objective: z.ZodOptional<z.ZodString>;
|
|
103
|
-
clientModel: z.ZodOptional<z.ZodString>;
|
|
104
101
|
domainTools: z.ZodOptional<z.ZodBoolean>;
|
|
105
102
|
highlights: z.ZodOptional<z.ZodBoolean>;
|
|
106
103
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -240,10 +237,17 @@ type ToolContext = {
|
|
|
240
237
|
};
|
|
241
238
|
[key: string]: unknown;
|
|
242
239
|
};
|
|
240
|
+
type ToolIcon = {
|
|
241
|
+
src: string;
|
|
242
|
+
mimeType?: string;
|
|
243
|
+
sizes?: string[];
|
|
244
|
+
theme?: 'light' | 'dark';
|
|
245
|
+
};
|
|
243
246
|
/** A tool as registered on the server. */
|
|
244
247
|
interface ToolDefinition {
|
|
245
248
|
name: string;
|
|
246
249
|
description?: string;
|
|
250
|
+
icons?: ToolIcon[];
|
|
247
251
|
/** A Standard Schema (for example a zod object) for the arguments. */
|
|
248
252
|
parameters?: unknown;
|
|
249
253
|
/** JSON Schema of the structured result. */
|
|
@@ -267,6 +271,25 @@ interface ToolDefinition {
|
|
|
267
271
|
type ToolRegistrar = {
|
|
268
272
|
addTool(tool: ToolDefinition): void;
|
|
269
273
|
};
|
|
274
|
+
type ResourceContent = ({
|
|
275
|
+
text: string;
|
|
276
|
+
} | {
|
|
277
|
+
blob: string;
|
|
278
|
+
}) & {
|
|
279
|
+
uri?: string;
|
|
280
|
+
mimeType?: string;
|
|
281
|
+
_meta?: Record<string, unknown>;
|
|
282
|
+
};
|
|
283
|
+
interface ResourceDefinition {
|
|
284
|
+
uri: string;
|
|
285
|
+
name: string;
|
|
286
|
+
description?: string;
|
|
287
|
+
mimeType?: string;
|
|
288
|
+
load(session?: Session): Promise<ResourceContent | ResourceContent[]>;
|
|
289
|
+
}
|
|
290
|
+
type ResourceRegistrar = {
|
|
291
|
+
addResource(resource: ResourceDefinition): void;
|
|
292
|
+
};
|
|
270
293
|
/** The HTTP request `authenticate` receives; absent for stdio. */
|
|
271
294
|
type AuthenticationRequest = {
|
|
272
295
|
headers: IncomingHttpHeaders;
|
|
@@ -284,11 +307,9 @@ type ToolCallEvent = {
|
|
|
284
307
|
} | {
|
|
285
308
|
status: 'success';
|
|
286
309
|
result: unknown;
|
|
287
|
-
agentHints?: string[];
|
|
288
310
|
} | {
|
|
289
311
|
status: 'error';
|
|
290
312
|
error: unknown;
|
|
291
|
-
agentHints?: string[];
|
|
292
313
|
});
|
|
293
314
|
/** Per-request credential and extra headers for calls to the Firecrawl API. */
|
|
294
315
|
type OutboundRequest = {
|
|
@@ -333,6 +354,7 @@ interface FirecrawlMcpServerHooks {
|
|
|
333
354
|
instructions?: string | ((defaults: InstructionDefaults) => string);
|
|
334
355
|
/** Adds tools after the built-in ones. They bypass `toolFilter`. */
|
|
335
356
|
registerExtraTools?: (registrar: ToolRegistrar, context: ExtraToolsContext) => void;
|
|
357
|
+
registerResources?: (registrar: ResourceRegistrar) => void;
|
|
336
358
|
/** Credential and headers for each Firecrawl API request of a session. */
|
|
337
359
|
outboundRequest?: (session: SessionData | undefined) => OutboundRequest | undefined;
|
|
338
360
|
/** Runs before a keyless request; throw to refuse it. */
|
|
@@ -401,4 +423,4 @@ declare const structuredCompactResult: (data: unknown) => ToolResult;
|
|
|
401
423
|
|
|
402
424
|
declare function createFirecrawlMcpServer(options?: FirecrawlMcpServerOptions): FirecrawlMcpServer;
|
|
403
425
|
|
|
404
|
-
export { ALEXANDRIA_CATALOGUE_VERTICALS, ALEXANDRIA_SEARCH_INSTRUCTIONS, type AuthenticationRequest, type ExtraToolsContext, type FirecrawlMcpServer, type FirecrawlMcpServerHooks, type FirecrawlMcpServerOptions, type FirecrawlMcpServerStartArgs, type HttpApp, type InstructionDefaults, keylessToolNames as KEYLESS_TOOL_NAMES, type OutboundRequest, type ProtectedResourceMetadata, SEARCH_DOMAINS_CONFLICT_MESSAGE, type Session, type SessionData, type ToolCallEvent, type ToolContext, type ToolDefinition, type ToolLogger, type ToolRegistrar, type ToolResult, UserError, assertExchangeCredential, createFirecrawlMcpServer, defaultDomainTools, hasAlexandria, invalidApiKeyRecoveryPayload, invalidOAuthRecoveryPayload, keylessQuotaReason, keylessSignupUrlFrom, normalizeHeader, normalizeSearchSources, originHeaders, postSearchWithFallback, recoveryPayload, relayExchangeError, relayTermsRequired, removeEmptyTopLevel, requestOrigin, searchDomainsAreExclusive, searchOutputSchema, searchQueryIsValid, searchToolBaseFields, structuredCompactResult as structuredCompact, withoutTrailingSlash };
|
|
426
|
+
export { ALEXANDRIA_CATALOGUE_VERTICALS, ALEXANDRIA_SEARCH_INSTRUCTIONS, type AuthenticationRequest, type ExtraToolsContext, type FirecrawlMcpServer, type FirecrawlMcpServerHooks, type FirecrawlMcpServerOptions, type FirecrawlMcpServerStartArgs, type HttpApp, type InstructionDefaults, keylessToolNames as KEYLESS_TOOL_NAMES, type OutboundRequest, type ProtectedResourceMetadata, type ResourceContent, type ResourceDefinition, type ResourceRegistrar, SEARCH_DOMAINS_CONFLICT_MESSAGE, type Session, type SessionData, type ToolCallEvent, type ToolContext, type ToolDefinition, type ToolIcon, type ToolLogger, type ToolRegistrar, type ToolResult, UserError, assertExchangeCredential, createFirecrawlMcpServer, defaultDomainTools, hasAlexandria, invalidApiKeyRecoveryPayload, invalidOAuthRecoveryPayload, keylessQuotaReason, keylessSignupUrlFrom, normalizeHeader, normalizeSearchSources, originHeaders, postSearchWithFallback, recoveryPayload, relayExchangeError, relayTermsRequired, removeEmptyTopLevel, requestOrigin, searchDomainsAreExclusive, searchOutputSchema, searchQueryIsValid, searchToolBaseFields, structuredCompactResult as structuredCompact, withoutTrailingSlash };
|