feat: standardize README and add workflow templates - #23
Conversation
- Update README structure to match mcp-opinion standard format - Add emojis and improve section organization - Add AUTO-GENERATED TOOLS markers for tool documentation sync - Add push.yml, release.yml, sync-tools.yml workflow templates - Add generate-mcp-tools action for auto-syncing tool docs 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 automation infrastructure. It standardizes the 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
This pull request introduces a new GitHub Action to automatically generate tool documentation in the README.md file, standardizes the README structure, and adds new workflow templates. These changes significantly improve documentation consistency and streamline development workflows. Overall, the changes are well-implemented, but there are a few areas for improvement regarding clarity, efficiency, and consistency with the new automation.
| ### Authentication Tools (5 tools) | ||
| - **GET_AUTH_STATUS**: Check current authentication status | ||
| - **GET_SIGNING_MESSAGE**: Get a signing message with nonce for wallet authentication | ||
| - **VERIFY_AUTH**: Verify if the user is authenticated | ||
| - **LOGIN**: Authenticate a user with a signed message and create a session | ||
| - **LOGOUT**: Log out the user by clearing the session cookie | ||
|
|
||
| You: "Here's my signature: 0xabc123..." | ||
| ### Market Data Tools (13 tools) | ||
| - **SEARCH_MARKETS**: Search for prediction markets using semantic similarity | ||
| - **GET_MARKET**: Get detailed information about a specific market by slug or address | ||
| - **GET_ACTIVE_MARKETS**: Browse active (unresolved) markets with optional filtering | ||
| - **GET_ACTIVE_MARKETS_BY_CATEGORY**: Browse active markets filtered by category ID | ||
| - **GET_CATEGORIES**: Get all available categories | ||
| - **GET_CATEGORIES_COUNT**: Get the number of active markets for each category | ||
| - **GET_ACTIVE_SLUGS**: Get slugs, strike prices, tickers, and deadlines for all active markets | ||
| - **GET_MARKET_ORDERBOOK**: View current orderbook with bids and asks | ||
| - **GET_HISTORICAL_PRICE**: Retrieve historical price data with configurable time intervals | ||
| - **GET_FEED_EVENTS**: Get the latest feed events for a specific market | ||
| - **GET_MARKET_EVENTS**: Get recent market events including trades and orders | ||
| - **GET_LOCKED_BALANCE**: Get funds locked in open orders (requires authentication) | ||
| - **GET_USER_ORDERS**: Get all user orders for a specific market (requires authentication) | ||
|
|
||
| Claude: [Uses LOGIN tool] | ||
| → ✅ Successfully logged in as 0x742d35Cc... | ||
| ### Portfolio Tools (8 tools) | ||
| - **GET_PORTFOLIO_POSITIONS**: Get user portfolio positions with P&L calculations | ||
| - **GET_PORTFOLIO_TRADES**: Retrieve all trades executed by the user | ||
| - **GET_PORTFOLIO_HISTORY**: Get paginated history including AMM/CLOB trades, splits/merges | ||
| - **GET_PORTFOLIO_POINTS**: Get points breakdown for the user | ||
| - **GET_USER_TRADED_VOLUME**: Get total traded volume for a specific user address (public) | ||
| - **GET_PUBLIC_USER_POSITIONS**: Get all positions for a specific user address (public) | ||
| - **GET_USER_PROFILE**: Get detailed user profile information | ||
| - **GET_TRADING_ALLOWANCE**: Check USDC allowance for CLOB or NegRisk trading | ||
|
|
||
| You: "Show me my portfolio positions" | ||
| ### Trading Tools (4 tools) | ||
| - **CREATE_ORDER**: Create a buy or sell order for prediction market positions | ||
| - **CANCEL_ORDER**: Cancel a specific open order by order ID | ||
| - **CANCEL_ORDER_BATCH**: Cancel multiple orders in a single batch operation | ||
| - **CANCEL_ALL_ORDERS**: Cancel all user orders in a specific market | ||
|
|
There was a problem hiding this comment.
The pull request introduces an automatic tool documentation synchronization feature using AUTO-GENERATED TOOLS markers. The current README.md still contains a manually maintained list of tools within the <!-- AUTO-GENERATED TOOLS START --> and <!-- AUTO-GENERATED TOOLS END --> block. This manual list should be removed entirely, as the generate-tools.mjs script is intended to populate this section automatically. Leaving it will lead to redundant or outdated information once the script runs.
| `Warning: ${file} exports multiple MCP-like tools. Using the first one.`, | ||
| ); | ||
| } |
There was a problem hiding this comment.
When a file exports multiple MCP-like tools, the warning message Warning: ${file} exports multiple MCP-like tools. Using the first one. could be more informative. It would be helpful to specify which tool is being used (e.g., by its name property) and which ones are being ignored. This clarifies the behavior for debugging or understanding why a specific tool might not appear in the generated documentation.
console.warn(
`Warning: ${file} exports multiple MCP-like tools. Using the first one: ${matches[0].name}. Other tools found: ${matches.slice(1).map(t => t.name).join(", ")}.`,
);| let table = hasDefaults | ||
| ? "| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n" | ||
| : "| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n"; | ||
|
|
||
| // Build table rows | ||
| for (const [key, prop] of Object.entries(properties)) { | ||
| const type = Array.isArray(prop.type) | ||
| ? prop.type.join(" | ") | ||
| : (prop.type ?? "unknown"); | ||
|
|
||
| const requiredStr = required.has(key) ? "✅" : ""; | ||
| const description = prop.description ?? ""; | ||
| const defaultVal = | ||
| prop.default !== undefined ? JSON.stringify(prop.default) : ""; | ||
|
|
||
| if (hasDefaults) { | ||
| table += `| \`${key}\` | ${type} | ${requiredStr} | ${defaultVal} | ${description} |\n`; | ||
| } else { | ||
| table += `| \`${key}\` | ${type} | ${requiredStr} | ${description} |\n`; | ||
| } |
There was a problem hiding this comment.
Building the table string using repeated += in a loop can be inefficient, especially for schemas with many properties. A more performant and idiomatic approach in JavaScript is to collect the rows in an array and then join them at the end.
const tableRows = [];
if (hasDefaults) {
tableRows.push("| Parameter | Type | Required | Default | Description |");
tableRows.push("|-----------|------|----------|---------|-------------|");
} else {
tableRows.push("| Parameter | Type | Required | Description |");
tableRows.push("|-----------|------|----------|-------------|");
}
for (const [key, prop] of Object.entries(properties)) {
const type = Array.isArray(prop.type)
? prop.type.join(" | ")
: (prop.type ?? "unknown");
const requiredStr = required.has(key) ? "✅" : "";
const description = prop.description ?? "";
const defaultVal =
prop.default !== undefined ? JSON.stringify(prop.default) : "";
if (hasDefaults) {
tableRows.push(`| \`${key}\` | ${type} | ${requiredStr} | ${defaultVal} | ${description} |`);
} else {
tableRows.push(`| \`${key}\` | ${type} | ${requiredStr} | ${description} |`);
}
}
return tableRows.join("\n").trim();
Summary
Test plan
pnpm run lint) - passespnpm test:unit) - all 297 tests passpnpm run build) - compiles successfully🤖 Generated with Claude Code