Skip to content

MCP: a missing, misnamed or mistyped tool argument answers only "An error occurred invoking '<tool>'."; an unknown tool name answers "Access denied ... Required permission: none" #694

Description

@Justinvolved

Describe the bug

When a tools/call request does not match the tool's inputSchema, the MCP server returns a tool error whose only text is An error occurred invoking '<tool>'. It does not name the missing member, the unexpected member or the type mismatch. The same text appears for a required member that is absent, for a member sent under the wrong name, and for a value of the wrong type. An agent cannot tell a malformed call from a server fault, so it retries blindly or concludes the tool is broken.

Two related message problems:

  • A tool name the server does not register answers Access denied. MCP configuration '<name>' is not allowed to call tool '<tool>'. Required permission: none. Allowed permission: none. instead of an unknown-tool error. This happens for an invented name as well, so it reads as a permission problem when the tool does not exist.
  • A member the schema does not declare is silently ignored and the call reports success (for example update_orders with orderDate, see the separate report on order dates).

To Reproduce

  1. tools/list. Note that get_assortment_relations requires assortmentId, get_paragraphs_by_page_id requires pageId (integer) and get_pages_by_ids requires pageIds (integer array).
  2. tools/call get_assortment_relations {}.
  3. tools/call get_paragraphs_by_page_id {"id": <existing page id>} (wrong member name).
  4. tools/call get_paragraphs_by_page_id {"pageId": "abc"} (wrong type).
  5. tools/call get_pages_by_ids {"id": <existing page id>} (wrong member name).
  6. Control: tools/call get_paragraphs_by_page_id {"pageId": <same id>} and get_pages_by_ids {"pageIds": [<same id>]} return data.
  7. tools/call get_product_by_id {"id": "<product id>"} (not registered; get_products_by_ids is) and tools/call no_such_tool_xyz {}.

Observed (DW 10.28.11, MCP add-in 0.6.0-BETA, a configuration with Full access):

get_assortment_relations {}                      -> isError: true, "An error occurred invoking 'get_assortment_relations'."
get_paragraphs_by_page_id {"id":8517}            -> isError: true, "An error occurred invoking 'get_paragraphs_by_page_id'."
get_paragraphs_by_page_id {"pageId":"abc"}       -> isError: true, "An error occurred invoking 'get_paragraphs_by_page_id'."
get_pages_by_ids {"id":8517}                     -> isError: true, "An error occurred invoking 'get_pages_by_ids'."
save_user_groups {"items":[...]}  (schema: groups) -> isError: true, "An error occurred invoking 'save_user_groups'."
get_paragraphs_by_page_id {"pageId":8517}        -> {"count":1,"data":[...]}
get_pages_by_ids {"pageIds":[8517]}              -> {"count":1,"data":[{"id":8517,...}]}

get_product_by_id {"id":"<product id>"} -> "An error occurred invoking 'get_product_by_id': Access denied. MCP configuration '<name>' is not allowed to call tool 'get_product_by_id'. Required permission: none. Allowed permission: none."
no_such_tool_xyz {}                    -> same text for 'no_such_tool_xyz'

Expected behavior

  • A call that fails schema validation returns JSON-RPC -32602 Invalid params (or a tool error) that names the member: missing required argument 'assortmentId', unknown argument 'id'; expected 'pageId', 'pageId' must be an integer.
  • An unregistered tool name returns an unknown-tool error (JSON-RPC -32602 "Unknown tool", as the MCP specification suggests), not an access denial with "Required permission: none".
  • A member the schema does not declare is rejected, or at least reported back, rather than ignored while the call reports success.

Environment

  • Dynamicweb 10.28.11 (.NET 10 hosting)
  • MCP add-in 0.6.0-BETA over HTTP JSON-RPC (/admin/mcp), API-key configuration with Full access

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingPlatformFor items related to the entire platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions