Skip to content

Conversation

@triepod-ai
Copy link

Summary

This PR adds 82 .describe() annotations to all Zod parameter schemas, enabling AI agents to better understand tool parameters and their usage.

Why This Matters

Currently, AI agents using this MCP server have no documentation for tool parameters. They must guess:

  • What each parameter does
  • What values are valid
  • What formats to use (ISO codes, UUIDs, etc.)
  • What the defaults are
  • What recommended ranges to use

With .describe() annotations, all this information is included in the JSON Schema output via tools/list, enabling any MCP client to provide better parameter guidance.

Changes

Before (0 descriptions):

url: z.string().url(),
waitFor: z.number().optional(),
maxAge: z.number().optional(),

After (with descriptions):

url: z.string().url().describe("The URL to scrape content from. Must be a valid HTTP/HTTPS URL"),
waitFor: z.number().optional().describe("Milliseconds to wait before scraping. Useful for dynamic content..."),
maxAge: z.number().optional().describe("Maximum cache age in milliseconds. Use cached results if available..."),

Coverage

Tool Parameters Descriptions Added
firecrawl_scrape 15 ✅ All
firecrawl_map 6 ✅ All
firecrawl_search 8 ✅ All
firecrawl_crawl 16 ✅ All
firecrawl_check_crawl_status 1 ✅ All
firecrawl_extract 6 ✅ All
firecrawl_agent 3 ✅ All
firecrawl_agent_status 1 ✅ All
Total 56 top-level + 26 nested 82

Description Quality

Each description includes where applicable:

  • Clear explanation of purpose
  • Concrete examples (e.g., 'US', 'GB', 'DE')
  • Format specifications (e.g., "ISO 3166-1 alpha-2")
  • Default values
  • Recommended ranges
  • Caveats and warnings

Verification

# Count descriptions
grep -c '\.describe(' src/index.ts
# Output: 82

# Verify in JSON Schema output
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/index.js | \
  jq '.result.tools[0].inputSchema.properties.url.description'
# Output: "The URL to scrape content from. Must be a valid HTTP/HTTPS URL"

Test plan

  • TypeScript compiles without errors
  • All 82 descriptions appear in tools/list JSON Schema output
  • Nested schema descriptions (location, actions, formats, parsers) work correctly
  • SAFE_MODE conditional schemas still work (actions/webhook excluded when enabled)

🤖 Generated with Claude Code

Add 82 parameter descriptions using Zod's .describe() method to improve
AI agent understanding of tool parameters. This enables LLMs to better
understand parameter usage, types, formats, and recommended values.

Changes:
- Add descriptions to all 56 tool parameters across 8 tools
- Include examples, default values, and recommended ranges
- Document nested schemas (location, actions, formats, parsers, webhook)
- Add descriptions to all enum values and object properties

Benefits for AI agents:
- Clear understanding of what each parameter does
- Concrete examples for proper usage
- Default value documentation
- Recommended value ranges to avoid issues
- Format specifications (ISO codes, UUID, etc.)

All descriptions are visible in the JSON Schema output via tools/list,
enabling any MCP client to provide better parameter guidance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

1 participant