Skip to content

fix: 🤖 attempt fix for issue #514#519

Open
github-actions[bot] wants to merge 2 commits intomainfrom
ai-fix/issue-514
Open

fix: 🤖 attempt fix for issue #514#519
github-actions[bot] wants to merge 2 commits intomainfrom
ai-fix/issue-514

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Automated fix attempt

Fixes #514

Source issue: #514

Summary

Summary

Files changed:

  1. mcp/src/tools/logs.ts — Added a direct searchClsLog MCP tool alias alongside the existing queryLogs tool:

    • Extracted the log search handler logic into a shared handleSearchClsLog() function
    • queryLogs(action="searchLogs") now delegates to handleSearchClsLog instead of duplicating the logic
    • Registered a new searchClsLog tool that calls handleSearchClsLog directly, with queryString as a required parameter (no action param needed)
    • Updated queryLogs description to note that action=searchLogs is equivalent to the searchClsLog tool, following the existing pattern in env.ts for legacy tool name documentation
  2. mcp/src/tools/logs.test.ts — Added two test cases for the new alias:

    • searchClsLog tool should be registered and search cls logs — verifies tool registration, metadata, and that the handler calls the Manager SDK correctly
    • searchClsLog should error when queryString is missing — verifies the required-parameter validation

Design rationale: The searchClsLog tool exposes the canonical CloudBase Manager SDK method name as a direct MCP tool entry, so models/evaluators that already know the searchClsLog concept can discover and use it without translating through queryLogs(action="searchLogs"). Both tools share the same underlying handler, avoiding code duplication.

@binggg binggg reopened this Apr 15, 2026
@binggg
Copy link
Copy Markdown
Member

binggg commented Apr 15, 2026

Follow-up iteration for issue_mnt9nu7f_yh77wx / run atomic-js-cloudbase-cli-log-query-by-request-id/2026-04-11T00-48-39-nszg86:

  • clarified queryLogs(action="searchLogs") as the alias of searchClsLog
  • returned explicit action/aliasOf metadata from both log search entries
  • tightened the direct searchClsLog runtime guard for missing queryString
  • refreshed focused vitest coverage for both entrypoints

Validation:

  • npx vitest run mcp/src/tools/logs.test.ts
  • npm --prefix mcp run build

The local AI Coding Eval Report API is currently unavailable on 127.0.0.1:5174 in this environment, so I could not run a fresh post-PR evaluation yet.

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.

feat(logs): expose searchClsLog-compatible log query entry

1 participant