Skip to content

fix: list server tools#21

Merged
ian-pascoe merged 4 commits into
mainfrom
fix/list-server-tools
May 26, 2026
Merged

fix: list server tools#21
ian-pascoe merged 4 commits into
mainfrom
fix/list-server-tools

Conversation

@ian-pascoe
Copy link
Copy Markdown
Contributor

No description provided.

@ian-pascoe
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f220c17e0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tools/diagnosticTools.ts Outdated
error.code === -32601 ||
error.code === "MethodNotFound" ||
error.code === "METHOD_NOT_FOUND" ||
(error instanceof Error && /unhandled|method not found/i.test(error.message))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Narrow fallback detection to true method-not-found errors

collectFileDiagnostics now falls back to push diagnostics whenever the error message contains "unhandled", even if the RPC error code is not method-not-found. In practice, a pull-diagnostics server can return internal failures like -32603 with messages such as “Unhandled exception…”, and this branch will silently convert that real failure into an ok: true push result (often empty), masking server errors and dropping diagnostics.

Useful? React with 👍 / 👎.

Comment thread src/tools/standardTools.ts Outdated
matchedItems: number,
limit: number,
): unknown[] & { lspMcpMeta?: ReturnType<typeof completionMeta> } {
return Object.assign(items, { lspMcpMeta: completionMeta(totalItems, matchedItems, limit) });
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return completion metadata in a JSON-serializable shape

For CompletionItem[] responses, withCompletionMeta stores lspMcpMeta as a custom property on an array via Object.assign. Array custom keys are not preserved by JSON serialization, so MCP clients receive only the truncated item list and lose metadata (totalItems, truncated, etc.) needed to understand default limiting/filtering behavior.

Useful? React with 👍 / 👎.

@ian-pascoe ian-pascoe merged commit c318e32 into main May 26, 2026
3 checks passed
@ian-pascoe ian-pascoe deleted the fix/list-server-tools branch May 26, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant