Skip to content

fix(mcp): tidy tool messages found in the 1.0 live test - #1974

Merged
phernandez merged 3 commits into
mainfrom
fix/tool-output-polish
Oct 29, 2026
Merged

phernandez merged 3 commits into
mainfrom
fix/tool-output-polish

Conversation

@phernandez

Copy link
Copy Markdown
Member

Why

Cosmetic issues from the 1.0 live MCP test. Each one makes tool output read worse to the agent.

What changed

  • Hints name the project as the caller did. Eight try_instead hints (NOT_FOUND, delete, write, move) used the project's UUID while 29 others used the caller's project value. ProjectTarget now carries project_ref: the caller's project, else the project named in the path, else the external id. It just resolved, so it works again in the hint.
  • Section errors end with a period. Available sections: A, B was followed directly by Read the note.... The ambiguous-section message got the same fix.
  • No meaningless scores. Filter-only and permalink-pattern searches rank nothing, so every hit showed score -0.000. Text output now leaves the score out when nothing ranked the hits.
  • tag: queries are echoed as typed. The tag: shorthand is split into a filter before formatting, so tag:x with no hits printed No results for ''. Headings now repeat the caller's query.

The schema/frontmatter finding from the same test is #1973 (post-1.0).

Testing

  • New test_unranked_hits_show_no_score and test_tag_shorthand_is_echoed_as_typed both fail without the change.
  • Hint assertions in test_note_targets.py updated to the caller's project.
  • tests/mcp, tests/markdown and the section-edit tests: 1591 passed. just typecheck and ruff are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8

- try_instead hints echo the project the caller named, not its UUID.
  Eight hints used the external id while 29 used the caller's value.
- Section errors end their list of sections with a period, so the
  appended "Read the note..." reads as its own sentence.
- bm_search text output leaves out scores when nothing ranked the hits
  (filters or a permalink pattern alone), where every score was -0.000.
- A tag: query is echoed as typed; "tag:x" with no hits printed
  "No results for ''".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T23:32:05.803245Z a3ad448 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 21aed7788a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

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

Copy link
Copy Markdown

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: 5aff057a4f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/basic_memory/mcp/note_targets.py Resolved
Without an explicit project, a Cloud mount routes by the id of the
workspace that listed it. The hint fell back to the bare name, which can
resolve to another workspace's project of the same name. Prefer the
pinned id; also stop echoing a blank search query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a3ad4482d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@phernandez
phernandez merged commit ae3599c into main Oct 29, 2026
53 of 54 checks passed
@phernandez
phernandez deleted the fix/tool-output-polish branch October 29, 2026 23:32
phernandez added a commit that referenced this pull request Oct 29, 2026
## Why

`just release v1.0.0` pre-flight-checks for a `## v1.0.0` heading on
`main`, so the changelog has to land first.

## What changed

`CHANGELOG.md`: the Unreleased section becomes `## v1.0.0 (2026-10-29)`.
Its existing items are kept, and the 60 or so commits since #1871 are
added:

- **Breaking:**
- the MCP surface is only `bm_*`, with the old tools deleted (#1944,
#1947, #1959, #1962–#1964)
  - `project` is required (#1934)
  - the ChatGPT adapters moved to Cloud
  - `bm tool` mirrors the tools (#1943)
  - the POSIX verbs are rebuilt and `bm tail` is removed (#1960)
  - cloud sync/bisync are removed (#1953)
  - `bm schema` project resolution (#1959)
  - LiteLLM is an optional extra
- **Features:** text-file line ranges in `bm_read`; chat imports return
their file paths.
- **Bug fixes:** including the three found in the 1.0 live test (#1971,
#1972, #1974), with contributor credits for @Flynn-Kawolsky (#1957),
@SWSAmor (#1951) and @MbappeWU (#1948).
- **Security:** the CodeRabbit deep-scan hardening batch.

I checked the entries against PR bodies rather than titles, and
corrected #1954, #1948 and #1967 to describe what they actually fixed.

The date is today; change it if the tag lands tomorrow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8

Signed-off-by: phernandez <paul@basicmachines.co>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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