Skip to content

Commit cded065

Browse files
committed
use amp toolbox instead of stdio mcp server
1 parent e8ddcb3 commit cded065

16 files changed

+183
-1199
lines changed

config.yml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ amp:
2626
server_url: "${AMP_SERVER_URL}"
2727
settings:
2828
amp.url: "${AMP_SERVER_URL}"
29-
amp.mcpServers:
30-
github:
31-
command: "sh"
32-
args:
33-
- "-c"
34-
- "cd ${GITHUB_APP_CWD} && node dist/mcp/server.js 2>/tmp/mcp-server.log"
35-
env:
36-
GITHUB_APP_CWD: "${GITHUB_APP_CWD}"
37-
GITHUB_APP_ID: "${GITHUB_APP_ID}"
38-
GITHUB_APP_PRIVATE_KEY_PATH: "${GITHUB_APP_PRIVATE_KEY_PATH}"
3929

4030
prompt_template: |
4131
Review this code diff as a senior developer. Look for bugs, clear logic errors, and code quality problems.
@@ -56,46 +46,17 @@ amp:
5646
Diff to review:
5747
__DIFF_CONTENT__
5848
49+
Use the tools available in the toolbox (prefixed with tb__) while performing your review. Read any existing PR comments before leaving new comments.
50+
5951
Review the diff content to identify issues. If you find any issues, leave specific inline comments for each issue found.
6052
6153
Suggested fixes are optional snippets of code that can directly replace the full line the indicated issue is on for an inline comment.
6254
If there is no simple code suggestion you can provide to fix the issue succinctly, do not provide a suggested fix.
6355
64-
Tools available to complete the code review process:
65-
__TOOL_CONTENT__
66-
6756
After you have completed the code review process, leave a single general comment.
6857
This comment should NOT reiterate the issues already identified in inline comments. Instead, include:
6958
* A brief summary of the diff's changes; include the goal of the changes and what they affect
7059
* A tour of the changes-- recommend the best tour order for reviewing the changes. Identify the best place to start the review-— the part that conveys the core and helps in understanding the rest.
7160
* (Optional) Any minor or vague considerations that were not obvious enough to be left as an inline comment-- don't repeat any inline comments.
7261
7362
Keep your tone professional and concise when commenting. No emojis.
74-
75-
tools:
76-
- name: leave_general_comment
77-
description: Leave general review comments on pull requests
78-
instructions:
79-
- "Use this tool to leave a general review comment on the pull request"
80-
- "This will post your comment as the top level comment on a review"
81-
- "Required: message"
82-
- "Example: 'The changes look good, but there are a few issues that need to be addressed'"
83-
- name: leave_inline_comment
84-
description: Leave inline comments on specific lines in pull requests
85-
instructions:
86-
- "Use this tool to leave comments on specific lines of code"
87-
- "This will post your comment directly on the line in the diff view via PR review"
88-
- "Required: message, path, line"
89-
- "Optional: suggested_fix - provide exact replacement code for obvious/trivial fixes only"
90-
- "For suggested_fix: only include the raw code replacement, no markdown formatting or explanations"
91-
- "Use suggested_fix for simple fixes like typos, missing semicolons, variable name corrections, etc."
92-
- "Do NOT use suggested_fix for complex changes, architectural decisions, or anything requiring explanation"
93-
- "Example: Comment on line 25 of src/auth.js about missing error handling"
94-
- "Example with fix: Comment on typo with suggested_fix: 'const userName = req.body.username;'"
95-
- name: get_pr_comments
96-
description: Get all comments on a pull request
97-
instructions:
98-
- "Use to retrieve existing comments on the pull request"
99-
- "Required: owner, repo, pr_number"
100-
- "Returns array of comments and total count"
101-
- "Helpful to see what feedback has already been given before adding new comments"

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
"scripts": {
88
"predev": "tsc",
99
"dev": "tsx watch src/server.ts",
10-
"build": "tsc",
10+
"build": "tsc && cp -r toolbox dist/",
1111
"start": "node dist/server.js",
12-
"mcp": "tsx src/mcp/server.ts",
13-
"mcp:build": "tsc && node dist/mcp/server.js",
1412
"test": "vitest",
1513
"lint": "eslint src/**/*.ts",
1614
"type-check": "tsc --noEmit"
@@ -26,7 +24,6 @@
2624
],
2725
"dependencies": {
2826
"@hono/node-server": "^1.13.7",
29-
"@modelcontextprotocol/sdk": "^1.17.1",
3027
"dotenv": "^16.4.7",
3128
"hono": "^4.6.10",
3229
"js-yaml": "^4.1.0",

0 commit comments

Comments
 (0)