Skip to content

Conversation

@Sushmithamallesh
Copy link
Contributor

@Sushmithamallesh Sushmithamallesh commented Nov 22, 2025

Note

Reworks Mastra provider docs to use an external TypeScript snippet and removes inline setup/usage content.

  • Docs (Mastra provider):
    • Streamline fern/pages/src/providers/mastra.mdx by removing inline install/setup and usage code; reference an external snippet via SnippetCode.
    • Add fern/snippets/providers/typescript/mastra.ts demonstrating:
      • Initializing Composio with MastraProvider and retrieving GMAIL_SEND_EMAIL tool.
      • Creating a Mastra Agent with OpenAI model and invoking generateVNext to send an email.

Written by Cursor Bugbot for commit b6cddc6. This will update automatically on new commits. Configure here.

@claude
Copy link
Contributor

claude bot commented Nov 22, 2025

Claude finished @Sushmithamallesh's task —— View job


Documentation Review Complete ✅

I've reviewed the Mastra provider documentation changes against the requested criteria. Here's my comprehensive feedback:

Todo List:

  • Read documentation style guide in fern/CLAUDE.md
  • Review modified MDX file (fern/pages/src/providers/mastra.mdx)
  • Review new TypeScript snippet (fern/snippets/providers/typescript/mastra.ts)
  • Analyze documentation quality across all criteria
  • Provide comprehensive feedback and recommendations

Review Feedback

Strengths

  • Good use of SnippetCode component: Properly follows the style guide by using <SnippetCode> for code examples instead of inline code blocks
  • Concise and focused: The documentation is appropriately brief and avoids marketing fluff
  • Clear structure: Good logical flow from explanation to usage example
  • Technical accuracy: The code snippet demonstrates proper Mastra integration

⚠️ Issues Found

Grammar and Spelling (fern/pages/src/providers/mastra.mdx)
  1. Line 21: "relavent" should be "relevant" (spelling error)
  2. Line 21: Missing article - should read "get and pass the relevant tools to the Mastra agent"
Clarity and Readability
  1. Line 10: The explanation could be clearer. Consider:

    Current: "Mastra is a TypeScript native framework for building agents with tools and MCPs."
    Suggested: "Mastra is a TypeScript-native framework for building agents with tools and MCPs."
    
  2. Missing context: The documentation jumps directly to usage without explaining prerequisites (authentication setup, connected accounts, etc.)

Code Quality (fern/snippets/providers/typescript/mastra.ts)
  1. Line 23: Using "gpt-5" model which doesn't exist - should be "gpt-4o" or another valid model
  2. Line 28: Contains emoji in code example (👋🏻) - style guide discourages emojis unless absolutely necessary
  3. Line 10: Comment mentions "create an auth config and a connected account" but this step isn't shown in the code

📋 Recommended Changes

For fern/pages/src/providers/mastra.mdx:
  1. Fix spelling: "relavent" → "relevant"
  2. Add missing article: "pass the relevant tools to the Mastra agent"
  3. Add hyphen: "TypeScript-native framework"
  4. Consider adding a brief note about authentication prerequisites before the usage section
For fern/snippets/providers/typescript/mastra.ts:
  1. Change model to a valid one: "gpt-4o" instead of "gpt-5"
  2. Remove emoji from the email subject for consistency with style guide
  3. Either implement the auth setup mentioned in the comment or remove the misleading comment

🎯 Style Guide Adherence

  • Good: Uses SnippetCode component correctly
  • Good: Professional, factual tone without marketing language
  • Good: Concise and direct approach
  • Good: Proper structure and logical flow

🔧 Overall Assessment

The documentation follows the style guide well overall, but needs minor corrections for grammar, spelling, and technical accuracy. The changes successfully modernize the documentation by using the SnippetCode component, which improves maintainability.

Recommendation: Address the spelling/grammar issues and update the code example to use a valid model name before merging.


tools: tools,
});

const { text } = await agent.generateVNext([
Copy link

Choose a reason for hiding this comment

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

Bug: Deprecated Mastra API method used

The code uses agent.generateVNext() which was deprecated in Mastra v0.20.00 and renamed to generate(). Other Mastra examples in the codebase use agent.generate() with a string parameter instead of an array. This will cause runtime errors if users have Mastra v0.20.00 or later installed.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

@claude
Copy link
Contributor

claude bot commented Nov 22, 2025

Claude finished @Sushmithamallesh's task —— View job


Documentation Review Complete ✅

I've reviewed the Mastra provider documentation changes against the requested criteria. Here's my comprehensive feedback:

Todo List:

  • Read documentation style guide in fern/CLAUDE.md
  • Review modified MDX file (fern/pages/src/providers/mastra.mdx)
  • Review new TypeScript snippet (fern/snippets/providers/typescript/mastra.ts)
  • Analyze documentation quality across all criteria
  • Provide comprehensive feedback and recommendations

Review Feedback

Strengths

  • Good use of SnippetCode component: Properly follows the style guide by using <SnippetCode> for code examples instead of inline code blocks
  • Concise and focused: The documentation is appropriately brief and avoids marketing fluff
  • Clear structure: Good logical flow from explanation to usage example
  • Technical accuracy: The code snippet demonstrates proper Mastra integration

⚠️ Issues Found

Grammar and Spelling (fern/pages/src/providers/mastra.mdx)
  1. Line 21: "relavent" should be "relevant" (spelling error)
  2. Line 21: Missing article - should read "get and pass the relevant tools to the Mastra agent"
Clarity and Readability
  1. Line 10: The explanation could be clearer. Consider:

    Current: "Mastra is a TypeScript native framework for building agents with tools and MCPs."
    Suggested: "Mastra is a TypeScript-native framework for building agents with tools and MCPs."
    
  2. Missing context: The documentation jumps directly to usage without explaining prerequisites (authentication setup, connected accounts, etc.)

Code Quality (fern/snippets/providers/typescript/mastra.ts)
  1. Line 23: Using "gpt-5" model which doesn't exist - should be "gpt-4o" or another valid model
  2. Line 28: Contains emoji in code example (👋🏻) - style guide discourages emojis unless absolutely necessary
  3. Line 10: Comment mentions "create an auth config and a connected account" but this step isn't shown in the code
  4. Line 27: CRITICAL ISSUE - Using deprecated generateVNext() method. According to the review comment, this was deprecated in Mastra v0.20.00 and should be generate() instead

📋 Recommended Changes

For fern/pages/src/providers/mastra.mdx:
  1. Fix spelling: "relavent" → "relevant"
  2. Add missing article: "pass the relevant tools to the Mastra agent"
  3. Add hyphen: "TypeScript-native framework"
  4. Consider adding a brief note about authentication prerequisites before the usage section
For fern/snippets/providers/typescript/mastra.ts:
  1. Change model to a valid one: "gpt-4o" instead of "gpt-5"
  2. Remove emoji from the email subject for consistency with style guide
  3. Either implement the auth setup mentioned in the comment or remove the misleading comment
  4. URGENT: Replace generateVNext() with generate() to fix deprecated API usage

🎯 Style Guide Adherence

  • Good: Uses SnippetCode component correctly
  • Good: Professional, factual tone without marketing language
  • Good: Concise and direct approach
  • Good: Proper structure and logical flow

🔧 Overall Assessment

The documentation follows the style guide well overall, but needs minor corrections for grammar, spelling, and technical accuracy. The changes successfully modernize the documentation by using the SnippetCode component, which improves maintainability.

Recommendation: Address the spelling/grammar issues and update the code example to use a valid model name and correct API method before merging.


const agent = new Agent({
name: "Email Agent",
instructions: "You are an email agent. You are responsible for sending emails to the users.",
model: openai("gpt-5"),
Copy link

Choose a reason for hiding this comment

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

Bug: Invalid OpenAI model name used

The code specifies openai("gpt-5") as the model, but GPT-5 hasn't been released yet. This will cause a runtime error when users try to execute the example. Valid OpenAI models include gpt-4-turbo, gpt-4o, or gpt-4o-mini.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

@Sushmithamallesh Sushmithamallesh changed the title Docs: Mastra agent provider Docs: Mastra agent provider[draft] Nov 23, 2025
@Sushmithamallesh Sushmithamallesh changed the title Docs: Mastra agent provider[draft] [DO not merge]Docs: Mastra agent provider[draft] Dec 24, 2025
@claude
Copy link
Contributor

claude bot commented Dec 24, 2025

Claude Code is working…

I'll analyze this and get back to you.

View job run

});

const { text } = await agent.generateVNext([
{ role: "user", content: "Send an email to [email protected] with the subject 'Hello from composio 👋🏻' and the body 'Congratulations on sending your first email using AI Agents and Composio!'" },
Copy link

Choose a reason for hiding this comment

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

Internal email address exposed in documentation example

The code example contains what appears to be an internal employee email address [email protected]. Documentation examples typically use placeholder addresses like [email protected] to avoid exposing internal contact information and to provide a clearer example pattern for users.

Fix in Cursor Fix in Web

@github-actions
Copy link
Contributor

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