Skip to content

fix(docs): fixed docs script to reflect the new output format for all blocks#653

Merged
waleedlatif1 merged 2 commits intostagingfrom
fix/docs-script
Jul 10, 2025
Merged

fix(docs): fixed docs script to reflect the new output format for all blocks#653
waleedlatif1 merged 2 commits intostagingfrom
fix/docs-script

Conversation

@waleedlatif1
Copy link
Collaborator

  • fix(docs): fixed tool docs generator script to match new output structure from blocks
  • updated outdated docs

Description

fixed docs script to reflect the new output format for all blocks, since we got rid of the response wrapper

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

How Has This Been Tested?

Ran the script and ensured that all outputs were not corrupted, but just reflected the new output structure

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

@vercel
Copy link

vercel bot commented Jul 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2025 6:58pm
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2025 6:58pm

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.

PR Summary

Extensive documentation update across all tool and block files to remove the 'response' wrapper object from output structures, reflecting a breaking change in the block output format.

  • Modified scripts/generate-block-docs.ts to handle flat field outputs and improve output extraction with fallback support
  • Updated 40+ tool documentation files (e.g. apps/docs/content/docs/tools/*.mdx) to directly expose output fields rather than nesting under a 'response' object
  • Simplified output parameter tables by removing nested '↳' notation and flattening the structure
  • Added better type inference for generated markdown tables in the documentation generator
  • Enhanced error handling and logging for documentation output processing

54 files reviewed, 22 comments
Edit PR Review Bot Settings | Greptile

Comment on lines 102 to +104
| Output | Type | Description |
| ------ | ---- | ----------- |
| `response` | object | Output from response |
|`content` | string | content of the response |
| `content` | string | content output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The output table's description could be more specific - consider "Raw text content extracted from the target URL"

Comment on lines +129 to +131
| `total_items` | number | total_items output from the block |
| `page_count` | number | page_count output from the block |
| `items` | json | items output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: improve description formatting consistency - other blocks capitalize first word of descriptions

Comment on lines 121 to +129

| Output | Type | Description |
| ------ | ---- | ----------- |
| `response` | object | Output from response |
| ↳ `results` | json | results of the response |
| ↳ `answer` | any | answer of the response |
| ↳ `query` | string | query of the response |
| ↳ `content` | string | content of the response |
| ↳ `title` | string | title of the response |
| ↳ `url` | string | url of the response |
| `results` | json | results output from the block |
| `answer` | any | answer output from the block |
| `query` | string | query output from the block |
| `content` | string | content output from the block |
| `title` | string | title output from the block |
| `url` | string | url output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Missing response type definitions. The output parameter types should be more specific than 'json' and 'any'. Consider defining exact types like string[], object, etc.

Comment on lines +91 to +92
- **result**: The value returned by your function
- **stdout**: Any console output from your function
Copy link
Contributor

Choose a reason for hiding this comment

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

style: update output fields documentation to include type information (e.g., result: any and stdout: string)

| `description` | string | description output from the block |
| `created` | string | created output from the block |
| `updated` | string | updated output from the block |
| `success` | boolean | success output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Data type for 'success' should be 'string' to match actual output shown in jira_update and jira_write tool sections

Suggested change
| `success` | boolean | success output from the block |
| `success` | string | success output from the block |

Comment on lines 147 to +155
| ------ | ---- | ----------- |
| `response` | object | Output from response |
| ↳ `tweet` | json | tweet of the response |
| ↳ `replies` | any | replies of the response |
| ↳ `context` | any | context of the response |
| ↳ `tweets` | json | tweets of the response |
| ↳ `includes` | any | includes of the response |
| ↳ `meta` | json | meta of the response |
| ↳ `user` | json | user of the response |
| ↳ `recentTweets` | any | recentTweets of the response |
| `tweet` | json | tweet output from the block |
| `replies` | any | replies output from the block |
| `context` | any | context output from the block |
| `tweets` | json | tweets output from the block |
| `includes` | any | includes output from the block |
| `meta` | json | meta output from the block |
| `user` | json | user output from the block |
| `recentTweets` | any | recentTweets output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Inconsistent type casing. All types should follow consistent casing - either 'JSON' or 'json', 'Any' or 'any'

Comment on lines 159 to +164

| Output | Type | Description |
| ------ | ---- | ----------- |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
| ↳ `updatedContent` | boolean | updatedContent of the response |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
| `updatedContent` | boolean | updatedContent output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Description text should be capitalized for consistency with other fields in the documentation ('content output' -> 'Content output')

Comment on lines +161 to +164
| `results` | json | results output from the block |
| `similarLinks` | json | similarLinks output from the block |
| `answer` | string | answer output from the block |
| `citations` | json | citations output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding descriptions more specific to each field's contents/purpose rather than just stating they are 'output from the block'

Suggested change
| `results` | json | results output from the block |
| `similarLinks` | json | similarLinks output from the block |
| `answer` | string | answer output from the block |
| `citations` | json | citations output from the block |
| `results` | json | Contains search results including title, URL, and text snippets for exa_search operations |
| `similarLinks` | json | List of related URLs and their similarity scores for exa_find_similar_links operations |
| `answer` | string | AI-generated response to the query for exa_answer operations |
| `citations` | json | Source URLs and text snippets that support the answer for exa_answer operations |

Comment on lines +148 to +155
| `tweet` | json | tweet output from the block |
| `replies` | any | replies output from the block |
| `context` | any | context output from the block |
| `tweets` | json | tweets output from the block |
| `includes` | any | includes output from the block |
| `meta` | json | meta output from the block |
| `user` | json | user output from the block |
| `recentTweets` | any | recentTweets output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Output descriptions are generic and not descriptive enough. Add specific details about what each field contains

Comment on lines 132 to +134
| ------ | ---- | ----------- |
| `response` | object | Output from response |
| ↳ `content` | string | content of the response |
| ↳ `metadata` | json | metadata of the response |
| `content` | string | content output from the block |
| `metadata` | json | metadata output from the block |
Copy link
Contributor

Choose a reason for hiding this comment

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

style: output parameter descriptions should be capitalized and end with periods to match style of input parameter descriptions above

@delve-auditor
Copy link

delve-auditor bot commented Jul 10, 2025

No security or compliance issues detected. Reviewed everything up to 7e97a7c.

Security Overview
  • 🔎 Scanned files: 55 changed file(s)
Detected Code Changes
Change Type Relevant files
Documentation ► function.mdx
    Update output field documentation
► response.mdx
    Simplify response output documentation
► airtable.mdx
    Update output fields format
► autoblocks.mdx
    Update output fields format
► browser_use.mdx
    Update output fields format
► clay.mdx
    Update output fields format
► confluence.mdx
    Update output fields format
► discord.mdx
    Update output fields format

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@waleedlatif1 waleedlatif1 merged commit 30538d9 into staging Jul 10, 2025
6 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/docs-script branch July 10, 2025 22:24
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
… blocks (simstudioai#653)

* fix(docs): fixed tool docs generator script to match new output structure from blocks

* updated outdated docs
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