Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • updated output for firecrawl extract

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Dec 12, 2025 6:46am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 12, 2025

Greptile Overview

Greptile Summary

Updated Firecrawl extract and search tool outputs to remove unused fields (sources and warning) that were not being populated from the API responses, and standardized numeric parameter validation across all Firecrawl tools.

  • Removed sources and warning fields from ExtractResponse type and extract tool outputs
  • Removed warning field from SearchResponse type and search tool output
  • Simplified numeric parameter validation from != null && !== '' to truthy checks across crawl, scrape, map, and search tools
  • Updated documentation to reflect the simplified extract output structure

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-isolated bug fixes that remove unused fields from tool outputs and simplify parameter validation logic. The refactoring is consistent across all tools and aligns with actual API behavior. No logic errors or breaking changes detected.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/tools/firecrawl/extract.ts 5/5 Removed warning field from output response, simplified output structure to only include success, jobId, and data
apps/sim/tools/firecrawl/search.ts 5/5 Removed warning field from output and cleaned up numeric parameter validation logic
apps/sim/tools/firecrawl/types.ts 5/5 Removed sources and warning fields from ExtractResponse, removed warning from SearchResponse

Sequence Diagram

sequenceDiagram
    participant Client
    participant Tool as Firecrawl Tools
    participant API as Firecrawl API
    
    Note over Client,API: Extract Tool Flow
    Client->>Tool: Call extract with URLs, prompt/schema
    Tool->>API: POST /v2/extract
    API-->>Tool: Returns jobId
    Tool->>Tool: Start polling (5s intervals, 5min max)
    loop Poll until complete/failed
        Tool->>API: GET /v2/extract/{jobId}
        API-->>Tool: Returns status & data
        alt Status: completed
            Tool-->>Client: Returns {success, jobId, data}
        else Status: failed
            Tool-->>Client: Returns error
        end
    end
    
    Note over Client,API: Search Tool Flow
    Client->>Tool: Call search with query
    Tool->>API: POST /v2/search
    API-->>Tool: Returns search results
    Tool-->>Client: Returns {data}
    
    Note over Client,API: Crawl Tool Flow
    Client->>Tool: Call crawl with URL
    Tool->>API: POST /v2/crawl
    API-->>Tool: Returns jobId
    Tool->>Tool: Start polling (5s intervals, 5min max)
    loop Poll until complete/failed
        Tool->>API: GET /v2/crawl/{jobId}
        API-->>Tool: Returns status & pages
        alt Status: completed
            Tool-->>Client: Returns {pages, total, creditsUsed}
        else Status: failed
            Tool-->>Client: Returns error
        end
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (2)

  1. apps/sim/tools/firecrawl/types.ts, line 196-207 (link)

    logic: ExtractResponse type includes sources and warning fields but they're removed from extract.ts outputs

  2. apps/sim/tools/firecrawl/types.ts, line 147-168 (link)

    logic: SearchResponse type includes warning field but it's removed from search.ts transformResponse

6 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 3334dfe into staging Dec 12, 2025
9 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/build branch December 12, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants