feat: Standardize README structure - #3
Conversation
- Update README to follow standardized template with badges, sections for Overview, Features, Installation, Configuration, Usage Examples, etc. - Add AUTO-GENERATED TOOLS markers for dynamic tool documentation - Copy sync-tools.yml workflow for auto-syncing MCP tool docs - Add generate-tools.mjs action for tool documentation generation - Add zod-to-json-schema devDependency for schema conversion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @Royal-lobster, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the project's documentation and developer experience by implementing a standardized README structure and automating the generation of tool documentation. It introduces a new GitHub Action to dynamically update the "MCP Tools" section in the README, ensuring that information about available tools and their parameters is always current. This automation, coupled with a more organized README, aims to streamline onboarding and usage for both new and existing contributors and users. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request introduces a new script to standardize the README structure by dynamically generating MCP tool documentation. The README itself has been significantly updated to follow a more structured template, improving clarity and readability. New dependencies for schema conversion have been added to support the tool generation process. Overall, the changes enhance the project's documentation and automation capabilities.
| console.warn( | ||
| `Warning: ${file} exports multiple MCP-like tools. Using the first one.`, | ||
| ); | ||
| } |
There was a problem hiding this comment.
The current logic silently uses only the first MCP-like tool found if a file exports multiple. This could lead to unexpected behavior where other valid tools are ignored without explicit configuration or warning to the user that they are not being processed. Consider either processing all found tools or throwing an error if only one is expected, to prevent silent failures and make the script's behavior more predictable.
| const files = fs | ||
| .readdirSync(TOOLS_DIR) |
There was a problem hiding this comment.
Using fs.readdirSync performs synchronous I/O, which can block the Node.js event loop. For better performance and to avoid blocking, especially in a script that might run in a CI/CD environment, it's recommended to use the asynchronous fs.promises.readdir.
const files = (await fs.promises.readdir(TOOLS_DIR))
.filter((f) => f.endsWith(".ts") && f !== "index.ts");| .filter((f) => f.endsWith(".ts") && f !== "index.ts"); | ||
|
|
||
| const toolPromises = files.map(async (file) => { | ||
| const mod = await import(path.join(TOOLS_DIR, file)); |
There was a problem hiding this comment.
When using dynamic import() with paths constructed via path.join, there can be issues with URL resolution in ESM contexts. It's generally safer and more robust to use new URL for dynamic imports to ensure correct resolution relative to the current module.
const mod = await import(new URL(path.join(TOOLS_DIR, file), import.meta.url).href);| return readme.replace( | ||
| new RegExp(`${START}[\\s\\S]*?${END}`, "m"), | ||
| `${START}\n\n${toolsMd}\n\n${END}`, | ||
| ); |
There was a problem hiding this comment.
The replacement string adds \n\n before and after toolsMd. While this ensures spacing, if toolsMd itself already contains leading/trailing newlines (e.g., from renderMarkdown().trim() which might leave a trailing newline), it could result in excessive blank lines. It might be more consistent to ensure toolsMd is strictly trimmed of all leading/trailing whitespace and then explicitly add the desired number of newlines around it.
return readme.replace(
new RegExp(`${START}[\s\S]*?${END}`, "m"),
`${START}\n\n${toolsMd.trim()}\n\n${END}`,
);| Install the package globally to make the `mcp-abi` command available system-wide: | ||
| To use this server without installing it globally: | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
Summary
zod-to-json-schemadevDependency for schema conversionTest plan
pnpm run buildpnpm run lint🤖 Generated with Claude Code