Skip to content

Commit 3bf9933

Browse files
authored
feat: replace filepath with absolutePath and provide a concise description (#13)
* feat: replace `filepath` to `absolutePath` and concise describe * feat: adjust parmas sort
1 parent 1df23c8 commit 3bf9933

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/mcp/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ const server = new McpServer(
2222

2323
server.tool(
2424
'analyze',
25-
'Analyze your component to help you refactor and optimize hook abstractions.',
25+
`Analyze your component to assist in refactoring and optimizing hook abstractions. Requires 2 parameters: \`absolutePath\` (the file's absolute path) and \`framework\` (the project's framework, with optional values vue / react default vue).`,
2626
{
27-
filepath: z.string(),
27+
absolutePath: z.string(),
2828
framework: z.enum(['vue', 'react']).optional().default('vue'),
2929
},
30-
async ({ filepath, framework }) => {
31-
const code = await readFile(filepath, 'utf-8');
30+
async ({ absolutePath, framework }) => {
31+
const code = await readFile(absolutePath, 'utf-8');
3232
const res = await analyze(code, framework);
3333

3434
return {

0 commit comments

Comments
 (0)