Docs: Mastra agent provider[draft]
[!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.mdxby removing inline install/setup and usage code; reference an external snippet viaSnippetCode.- Add
fern/snippets/providers/typescript/mastra.tsdemonstrating:
- Initializing
ComposiowithMastraProviderand retrievingGMAIL_SEND_EMAILtool.- Creating a Mastra
Agentwith OpenAI model and invokinggenerateVNextto send an email.Written by Cursor Bugbot for commit b6cddc6bc7b1cc0d96abb682adf74fd5b5cd0733. This will update automatically on new commits. Configure here.
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:
- [x] Read documentation style guide in
fern/CLAUDE.md - [x] Review modified MDX file (
fern/pages/src/providers/mastra.mdx) - [x] Review new TypeScript snippet (
fern/snippets/providers/typescript/mastra.ts) - [x] Analyze documentation quality across all criteria
- [x] 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)
- Line 21: "relavent" should be "relevant" (spelling error)
- Line 21: Missing article - should read "get and pass the relevant tools to the Mastra agent"
Clarity and Readability
-
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." -
Missing context: The documentation jumps directly to usage without explaining prerequisites (authentication setup, connected accounts, etc.)
Code Quality (fern/snippets/providers/typescript/mastra.ts)
- Line 23: Using
"gpt-5"model which doesn't exist - should be"gpt-4o"or another valid model - Line 28: Contains emoji in code example (
👋🏻) - style guide discourages emojis unless absolutely necessary - 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:
- Fix spelling: "relavent" → "relevant"
- Add missing article: "pass the relevant tools to the Mastra agent"
- Add hyphen: "TypeScript-native framework"
- Consider adding a brief note about authentication prerequisites before the usage section
For fern/snippets/providers/typescript/mastra.ts:
- Change model to a valid one:
"gpt-4o"instead of"gpt-5" - Remove emoji from the email subject for consistency with style guide
- 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.
Preview your docs: https://composio-preview-b1a599a4-64e4-4c30-a9a6-0b540055ffbc.docs.buildwithfern.com
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:
- [x] Read documentation style guide in
fern/CLAUDE.md - [x] Review modified MDX file (
fern/pages/src/providers/mastra.mdx) - [x] Review new TypeScript snippet (
fern/snippets/providers/typescript/mastra.ts) - [x] Analyze documentation quality across all criteria
- [x] 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)
- Line 21: "relavent" should be "relevant" (spelling error)
- Line 21: Missing article - should read "get and pass the relevant tools to the Mastra agent"
Clarity and Readability
-
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." -
Missing context: The documentation jumps directly to usage without explaining prerequisites (authentication setup, connected accounts, etc.)
Code Quality (fern/snippets/providers/typescript/mastra.ts)
- Line 23: Using
"gpt-5"model which doesn't exist - should be"gpt-4o"or another valid model - Line 28: Contains emoji in code example (
👋🏻) - style guide discourages emojis unless absolutely necessary - Line 10: Comment mentions "create an auth config and a connected account" but this step isn't shown in the code
- Line 27: CRITICAL ISSUE - Using deprecated
generateVNext()method. According to the review comment, this was deprecated in Mastra v0.20.00 and should begenerate()instead
📋 Recommended Changes
For fern/pages/src/providers/mastra.mdx:
- Fix spelling: "relavent" → "relevant"
- Add missing article: "pass the relevant tools to the Mastra agent"
- Add hyphen: "TypeScript-native framework"
- Consider adding a brief note about authentication prerequisites before the usage section
For fern/snippets/providers/typescript/mastra.ts:
- Change model to a valid one:
"gpt-4o"instead of"gpt-5" - Remove emoji from the email subject for consistency with style guide
- Either implement the auth setup mentioned in the comment or remove the misleading comment
- URGENT: Replace
generateVNext()withgenerate()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.
Preview your docs: https://composio-preview-d03af9a7-3744-41b6-bdc6-c168a29189e6.docs.buildwithfern.com