@morphllm/morphmcp 0.8.29 → 0.8.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +38 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -511,19 +511,9 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
511
511
  },
512
512
  {
513
513
  name: "warp_grep",
514
- description: "**INTELLIGENT CODE SEARCH - USE THIS AGGRESSIVELY**\n\n" +
515
- " FAST & EFFICIENT: This tool prevents context pollution by finding only the relevant code you need, without reading unnecessary files.\n" +
516
- "🎯 USE THIS TOOL PROACTIVELY whenever you need to understand code to ensure a positive user experience.\n\n" +
517
- "Benefits:\n" +
518
- "- Extremely fast: AI-powered search agent finds code in seconds\n" +
519
- "- Prevents context pollution: Returns only relevant line ranges, not entire files\n" +
520
- "- Intelligent exploration: Automatically greps, reads, and analyzes to find what you need\n" +
521
- "- Precise results: Returns exact line numbers with full context\n\n" +
522
- "Intelligently search and gather relevant code context from a repository using an AI-powered search agent. " +
523
- "This tool automatically explores the codebase with grep, file reading, and directory analysis to find exactly the code snippets needed to answer questions about implementation details, architecture, or specific functionality. " +
524
- "Returns precise line ranges with full context. " +
525
- "Use this tool whenever you need to find specific code in a repository and you're unsure where it is located. " +
526
- "Example queries: 'Where is JWT token validation implemented?', 'How does the authentication middleware work?', 'Find the database connection setup'.",
514
+ description: "ALWAYS use Warp Grep when you need to search a large chunk of code. " +
515
+ "Warp Grep is a fast and accurate tool that can search for all relevant context in a codebase. " +
516
+ "Warp Grep can be used for query types like: find function responsible for <small feature>; find code that does <description>; find code path for <big feature>; Where does <minimal error message> come from?; or any query of that type",
527
517
  inputSchema: zodToJsonSchema(WarpGrepArgsSchema),
528
518
  requiresApiKey: true,
529
519
  },
@@ -638,7 +628,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
638
628
  file_path: parsed.data.path,
639
629
  instruction: parsed.data.instruction,
640
630
  model: 'morph-v3-fast',
641
- dry_run: parsed.data.dryRun
631
+ dry_run: parsed.data.dryRun,
632
+ request_content: {
633
+ path: parsed.data.path,
634
+ code_edit: parsed.data.code_edit,
635
+ instruction: parsed.data.instruction,
636
+ model: 'morph-v3-fast',
637
+ dry_run: parsed.data.dryRun
638
+ }
642
639
  },
643
640
  stack_trace: error instanceof Error ? error.stack : undefined,
644
641
  source: 'mcp-filesystem'
@@ -746,6 +743,33 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
746
743
  }
747
744
  parts.push(xmlBlocks.join("\n\n"));
748
745
  responseText = parts.join("\n");
746
+ // Report any file read errors that occurred during finish (non-fatal)
747
+ // These are files the agent referenced but couldn't be read
748
+ const fileReadErrors = result.errors?.filter((e) => e.message?.startsWith('File read error:')) || [];
749
+ if (fileReadErrors.length > 0) {
750
+ const errorMessages = fileReadErrors.map((e) => e.message).join("; ");
751
+ reportMorphError({
752
+ error_message: errorMessages,
753
+ error_type: 'FileReadError',
754
+ context: {
755
+ tool: 'warp_grep',
756
+ repo_path: parsed.data.repoPath,
757
+ query: parsed.data.query,
758
+ model: 'morph-warp-grep',
759
+ termination_reason: 'completed_with_file_errors',
760
+ error_count: fileReadErrors.length,
761
+ is_timeout: false,
762
+ request_content: {
763
+ query: parsed.data.query,
764
+ repoPath: parsed.data.repoPath,
765
+ repoRoot: path.resolve(parsed.data.repoPath),
766
+ model: 'morph-warp-grep'
767
+ },
768
+ files_requested: files.map((f) => f.path)
769
+ },
770
+ source: 'mcp-filesystem'
771
+ }).catch(() => { }); // Silently ignore reporting failures
772
+ }
749
773
  }
750
774
  else if (result.terminationReason === "terminated" &&
751
775
  result.errors.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morphllm/morphmcp",
3
- "version": "0.8.29",
3
+ "version": "0.8.31",
4
4
  "description": "Fast & accurate MCP server with AI-powered file editing and intelligent code search. Prevents context pollution and saves time for a better user experience.",
5
5
  "license": "MIT",
6
6
  "author": "Morph (https://morphllm.com)",