Rejected regionUrl errors don't say how to recover when an agent passes the organization's web URL

未关闭 适合新手
#2,777 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
84/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

从 packages/mcp-core/src/internal/tool-helpers/validate-region-url.ts 第 58–65 行附近开始,阅读现有的拒绝消息。保留允许列表的行为,然后修改错误,使其说明调用方应使用 find_organizations 中的 regionUrl,而不是 webUrl,或者省略 regionUrl。完成标准是:被拒绝的组织网站 URL 仍无法通过验证,并且错误中包含这些补救选项。

由索引模型根据 Issue 内容生成。

描述

mcp-feedback-pattern

Agents pass an organization's web URL (https://<org>.sentry.io, the webUrl from find_organizations) as regionUrl. The SSRF allowlist rightly rejects it, but the error only lists the allowed domains. It doesn't say the agent passed the wrong URL or that omitting regionUrl works, so agents retry with a guessed region or give up.

Where

  • packages/mcp-core/src/internal/tool-helpers/validate-region-url.ts (~L58-65) throws Invalid regionUrl. The domain '<org>.sentry.io' is not allowed. Allowed domains are: sentry.io, us.sentry.io, de.sentry.io with no next step.
  • ParamRegionUrl (packages/mcp-core/src/schema.ts ~L184-186) and find_organizations already describe regionUrl and webUrl correctly, so this is about recovery, not the description.

Expected

The rejection keeps the allowlist (no SSRF change) and tells the agent to pass the regionUrl from find_organizations, not the webUrl, or to omit regionUrl.

Reports

  • MCP-SERVER-GX7 (hosted, org-scoped URL): get_event_stacktrace rejected the org's web URL; the agent then guessed https://us.sentry.io and hit a 401 (also counted on #2495).
  • MCP-SERVER-GYN (hosted, org-scoped URL): get_issue_details and get_replay_details rejected the org's web URL as regionUrl; omitting regionUrl worked.

Report count: 2

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_d3a7b079a597fb34fdd749c9c82402a4.

--

View Session [Sentry]

主要语言
TypeScript
星标
975
派生
189
平均合并
1 天 2 小时
30 天内合并 PR
571

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/toolkit 的其他 Issue

查看 getsentry/toolkit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。