Skip to content

fix(mcp): a banned license is reported as invalid input #1823

Done

Description

@marcossevilla

Description

When the MCP license check finds a dependency with a forbidden license, or one that is not in the allowed list, the failure payload says the input of the caller was invalid.

very_good packages check licenses exits with ExitCode.config (78) for a banned license. ToolFailureType.fromExitCode maps that code to validation, so the payload carries "failureType": "validation", "failureReason": "invalid_input" and the advice "Correct any invalid tool arguments before retrying."

Steps to reproduce

  1. Start very_good mcp in a package that depends on an MIT-licensed package.
  2. Call the license check tool with {"forbidden": ["MIT"]}.

Actual result

{
  "status": "partial_failure",
  "failureType": "validation",
  "failureReason": "invalid_input",
  "reason": "failed with exit code 78."
}

Expected result

The arguments were valid and the check did its job, so this is a business failure: a deterministic check reported a problem. An agent should be told to replace the dependency or ask the user about the license policy, not to fix its arguments. A dedicated failureReason (for example license_banned) with the banned packages listed in the payload would let an agent act without parsing the report.

Activity

  1. added
    bug
    on Nov 20, 2026
  2. unicoderbot commented on Nov 27, 2026

    @unicoderbot
    Contributor

    Great, I will work on a PR and push it soon.

    • Preparing environment
      • Cloning repository
      • Setting up dev environment
    • Working on changes
    • Writing description
    • Opening pull request

    I've opened a pull request: #1838

  3. added a commit that references this issue on Nov 27, 2026
    f772340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions