Surface AskBill sources in search_documentation MCP tool#29
Merged
Conversation
The AskBill websocket service returns both `answer` and `sources`, but the handler was only forwarding `answer`. Without citations, callers (and the LLMs consuming this tool) have no way to verify URLs the answer text mentions — in practice, hallucinated links slip through unchallenged. Append a `## Sources` section to the response, formatted from the `SourceMetadata` shape (title, url) defined in finn-mvp. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…g whitespace - Escape `\`, `[`, `]` in source titles so titles like "Auth [v2]" don't break the rendered markdown link. - Wrap URLs in angle brackets (`<url>`) so URLs containing parens (e.g. Wikipedia's `Plaid_(company)`) still render correctly. - `rstrip()` the answer before appending the Sources section so trailing newlines in the AskBill response don't produce 3+ blank lines. - Add a docstring to `_format_sources` to match the rest of the file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The `[tool.pytest]` section was non-canonical (should be `[tool.pytest.ini_options]`) and `python_files` was a bare string instead of a list. Older pytest tolerated both; newer pytest (9.x) hard-fails: TypeError: pyproject.toml: config option 'python_files' expects a list for type 'args', got str: 'test_*.py' Last green CI run was October 2025 against pytest 8.x; this PR is the first run since pytest 9 made it into the environment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Add to Cursor" button in
sandbox/README.mdwas silently failing because the base64-encoded config used the wrong shape.Decoded before:
{"command":"uvx mcp-server-plaid","env":{"PLAID_CLIENT_ID":"ADD_YOUR_CLIENT_ID","PLAID_SECRET":"ADD_YOUR_API_SECRET"}}Decoded after:
{"command":"uvx","args":["mcp-server-plaid"],"env":{"PLAID_CLIENT_ID":"ADD_YOUR_CLIENT_ID","PLAID_SECRET":"ADD_YOUR_API_SECRET"}}Cursor's install-mcp link expects
commandto be just the executable, with arguments in a separateargsarray (same shape asmcp.json). Concatenating them into thecommandstring makes Cursor try to spawn"uvx mcp-server-plaid"as a single binary, which fails.Refs: https://cursor.com/docs/context/mcp/install-links
Test plan
ADD_YOUR_*placeholders and verify the server starts🤖 Generated with Claude Code
Claude Session: 80ee54fa-3880-4c3c-b81d-9bf74c3adb2c