Gmail `search_emails` returns `from_` although its return declaration requires `from`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Problem
The model-visible declaration for Gmail search_emails requires emails[].from: string. Returned email records instead contain from_, with from absent.
This remains observable after accommodating the separate result wrapper discrepancy.
Reproduction
Connect Gmail and use a query that matches at least one message. Run inside functions.exec:
const response = await tools.mcp__codex_apps__gmail_search_emails({
query: "subject:newsletter -in:spam -in:trash",
max_results: 1
});
const data = response.structuredContent;
const payload = data.result ?? data;
const email = payload.emails[0];
if (!email) throw new Error("Choose a query matching one message.");
text({
hasFrom: Object.hasOwn(email, "from"),
hasFromUnderscore: Object.hasOwn(email, "from_"),
fromUnderscoreType: typeof email.from_
});
Observed:
{
"hasFrom": false,
"hasFromUnderscore": true,
"fromUnderscoreType": "string"
}
The call succeeded. Code using the declared email.from receives undefined.
Expected behavior
The advertised sender field and serialized response should agree. Add regression coverage for the field name in a nonempty search result.
Environment and scope
Reproduced September 6, 2026 through functions.exec, on macOS 26.6.2. Locally installed CLI: 0.153.4; Gmail plugin manifest: 0.1.10.
The reproduction reports only field presence and types. It includes no message content or account identifiers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Gmail search_emails entry point exercised through functions.exec and trace its declared response shape alongside the serialized email records. Add regression coverage for a nonempty search result that checks the advertised sender field and response field name agree; the test should pass without relying on message content or account identifiers.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100