Skip to content

chore: move file.upload → message.file.upload for Smithery hierarchy score#83

Merged
khaliqgant merged 3 commits intomainfrom
chore/file-upload-hierarchy
Mar 13, 2026
Merged

chore: move file.upload → message.file.upload for Smithery hierarchy score#83
khaliqgant merged 3 commits intomainfrom
chore/file-upload-hierarchy

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 13, 2026

Summary

  • Moves file.uploadmessage.file.upload to eliminate a singleton top-level namespace (8 → 7 top-level namespaces)
  • Files are uploaded to attach to messages, so the grouping is semantically correct
  • Adds backward-compat alias so file.upload still resolves
  • Targets the last 1 point on Smithery hierarchy score (99 → 100)

Test plan

  • All 180 MCP tests pass
  • Verify Smithery score hits 100 after deploy

🤖 Generated with Claude Code


Open with Devin

Renames file.upload → message.file.upload to eliminate a singleton
top-level namespace. Files are uploaded to attach to messages so the
grouping is semantically correct. Adds backward-compat alias for
the old name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

@khaliqgant khaliqgant force-pushed the chore/file-upload-hierarchy branch from 7031ced to 975395a Compare March 13, 2026 13:21
khaliqgant and others added 2 commits March 13, 2026 14:23
Addresses Devin review feedback — the handler now accepts the limit
arg (discarded with TODO) and the description clarifies it is reserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The inbox.check tool declared a limit input param but the handler and
SDK ignored it. Now the SDK's inbox() accepts { limit } and passes it
as a query param, and the MCP handler forwards it through.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment on lines +473 to +476
async inbox(options?: { limit?: number }): Promise<InboxResponse> {
const params: Record<string, string> = {};
if (options?.limit != null) params.limit = String(options.limit);
return this.client.get('/v1/inbox', params);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Inbox limit parameter is non-functional — server ignores it entirely

The new limit parameter on inbox() in the SDK (packages/sdk-typescript/src/agent.ts:473-476) sends ?limit=N as a query parameter to the server, and the MCP tool message.inbox.check (packages/mcp/src/tools/features.ts:83) advertises it as "Maximum number of inbox items to return". However, the server route at packages/server/src/routes/inbox.ts:14-19 never reads any query parameters — it calls inboxEngine.getInbox(db, workspace.id, agent!.id) with no limit argument. The engine function (packages/server/src/engine/inbox.ts:13) has signature getInbox(db, workspaceId, agentId) with hardcoded LIMIT 20 in its SQL queries. As a result, the limit parameter is silently ignored, misleading LLM agents that use it expecting fewer results.

Prompt for agents
The limit parameter added to the inbox() SDK method (packages/sdk-typescript/src/agent.ts:473-476) and the MCP tool message.inbox.check (packages/mcp/src/tools/features.ts:83-89) is non-functional because the server never reads it. To fix this:

1. In packages/server/src/routes/inbox.ts, read the limit query parameter from the request context (e.g. const limit = parseInt(c.req.query('limit') || '', 10) || undefined) and pass it to inboxEngine.getInbox.

2. In packages/server/src/engine/inbox.ts, add an optional limit parameter to the getInbox function signature and use it to cap the results (e.g. apply it to the mentions and reactions queries instead of hardcoded LIMIT 20).

3. Update openapi.yaml to document the new limit query parameter on GET /v1/inbox, per the AGENTS.md docs hygiene rule.

Alternatively, if the server support is intended for a future PR, remove the limit parameter from the SDK and MCP tool to avoid misleading users.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions
Copy link
Copy Markdown

Preview deployed!

Environment URL
API https://pr83-api.relaycast.dev
Health https://pr83-api.relaycast.dev/health
Observer https://pr83-observer.relaycast.dev/observer

This preview shares the staging database and will be cleaned up when the PR is merged or closed.

Run E2E tests

npm run e2e -- https://pr83-api.relaycast.dev --ci

Open observer dashboard

https://pr83-observer.relaycast.dev/observer

@khaliqgant khaliqgant merged commit ca8700d into main Mar 13, 2026
4 checks passed
@khaliqgant khaliqgant deleted the chore/file-upload-hierarchy branch March 13, 2026 13:32
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