Skip to content

Enhance tool descriptions and validations - #330

Open
erikengervall wants to merge 7 commits into
mainfrom
noaa/tool-descriptions
Open

Enhance tool descriptions and validations#330
erikengervall wants to merge 7 commits into
mainfrom
noaa/tool-descriptions

Conversation

@erikengervall

@erikengervall erikengervall commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
  • Improved descriptions for various parameters in the search query and monitor creation functions to provide clearer guidance on usage.
  • Added validation and descriptive messages for parameters in the research tools, enhancing user understanding of input requirements.
  • Updated the FULL_PROFILE_INSTRUCTIONS and SEARCH_PROFILE_INSTRUCTIONS to reflect a more accurate representation of tool capabilities and usage.
  • Introduced a new function to preserve parameter descriptions for better schema management.
  • Enhanced test cases to ensure descriptions are specific and free from non-neutral metadata patterns.

Tool descriptions

Tool descriptions now lead with what each tool does and the input it needs, then state the concrete return shape: URL lists, JSON monitor and check records, parse formats, extraction data, job ids, and text or markdown for research.

Behavioral detail callers depend on is stated explicitly:

  • firecrawl_search_feedback documents the credit behavior: the first accepted feedback per search id returns 1 credit of the 2 a search costs, within roughly two minutes, idempotent per id, with a daily cap signal.
  • firecrawl_monitor_update documents that patch fields nest inside body, matching its schema.
  • firecrawl_agent_status documents the real processing, completed, and failed states.
  • firecrawl_interact states that side effects persist after the session ends, which is what its destructive annotation reflects.
  • firecrawl_search documents optional highlights and scrapeOptions; firecrawl_parse enumerates its formats; firecrawl_monitor_check enumerates page statuses.

Research paper search wording is generalized so it stays accurate as coverage expands, and GitHub search is scoped to public issues, pull requests, and readmes.

erikengervall and others added 2 commits July 24, 2026 17:58
…arch modules

- Improved descriptions for various parameters in the search query and monitor creation functions to provide clearer guidance on usage.
- Added validation and descriptive messages for parameters in the research tools, enhancing user understanding of input requirements.
- Updated the `FULL_PROFILE_INSTRUCTIONS` and `SEARCH_PROFILE_INSTRUCTIONS` to reflect a more accurate representation of tool capabilities and usage.
- Introduced a new function to preserve parameter descriptions for better schema management.
- Enhanced test cases to ensure descriptions are specific and free from non-neutral metadata patterns.
Rewrite tool descriptions purpose-first so each one leads with what the
tool does and the input it needs, and state the concrete return shape.

- Name return shapes: URL lists, JSON monitor and check records, parse
  formats, extraction data, job ids, text and markdown for research.
- Restore search feedback economics: first accepted feedback per search
  id returns 1 credit of the 2 a search costs, the roughly two minute
  window, idempotency, and the daily cap signal.
- Correct firecrawl_monitor_update to state that patch fields nest
  inside body, matching its schema.
- Correct firecrawl_agent_status to the actual processing, completed,
  and failed states.
- State that firecrawl_interact side effects persist after the session
  ends, which is what its destructive annotation reflects.
- Document firecrawl_search highlights and scrapeOptions as optional,
  and enumerate parse formats and monitor check page statuses.
- Generalize research paper search wording so it stays accurate as
  coverage expands, and scope GitHub search to public issues, pull
  requests, and readmes.
- Drop restatements of behavior already implied by a tool's name.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread src/monitor.ts Outdated
Max17190 added 2 commits July 24, 2026 12:01
Zod 4 deprecates the string-method format validators in favor of
top-level schemas. Its own typings carry the notices, for example
"@deprecated Use z.url() instead".

Replace every affected call site so the codebase stays on current Zod
conventions and emits no deprecation warnings:

- z.string().url() to z.url() across scrape, map, crawl, extract,
  agent, interact, feedback, and monitor parameters.
- z.string().email() to z.email() for the monitor summary recipient.
- z.string().uuid(message) to z.uuid(message) for the search and job
  identifiers, preserving the custom messages.

The interact url dropped an explicit .trim() because z.url() already
trims. A differential check over padded, tabbed, empty, and invalid
inputs found no behavioral divergence.

The generated tools/list payload is byte identical before and after,
so no input schema or published tool metadata changes.
Models often send "" for unused monitor/interact optionals. Treat blanks
as omitted so z.url()/z.email() validation matches prior unset behavior,
and trim interact URLs before validating.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread src/monitor.ts
Max17190 added 3 commits July 24, 2026 15:29
Align blankToUndefined with interact: return trimmed non-blank values
so padded emails pass z.email(), and trim pages list entries the same way.
buildMonitorCreateBody already returns body alone; drop other keys before
schema validation so invalid empty shorthand cannot fail advanced creates.
Empty queries arrays from clients no longer fail monitor create, and
tools/list schemas are generated with Zod io:input so defaults stay optional.
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