这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG]: validFuncCall checks optional arguments #3901

@fpytloun

Description

@fpytloun

How are you running AnythingLLM?

Docker (local)

What happened?

I am using gitlab-mcp tool over streamable-http and it will result in this error without possibility to retrieve any details:

Invalid argument schema match

I tracked the issue down to validFuncCall and added some debug code:

    const props = Object.keys(foundFunc.parameters.properties);
    const fProps = Object.keys(functionCall.arguments);
    if (!this.compareArrays(props, fProps)) {
      return { valid: false, reason: `Invalid argument schema match. Expected properties: ${JSON.stringify(props)}, got: ${JSON.stringify(fProps)}` };
    }

which resulted in:

anythingllm  | [backend] info: [AgentLLM - gpt-4.1] Invalid function tool call: Invalid argument schema match.

Expected properties: ["assignee","author","confidential","created_after","created_before","due_date","iteration_id","labels","limit","milestone","project_id","search","state","updated_after","updated_before"],

got: ["project_id","assignee","state","updated_after"].

So it is verifying arguments passed to tool but ignores fact that some arguments are optional.

Are there known steps to reproduce?

No response

Metadata

Metadata

Assignees

Labels

investigatingCore team or maintainer will or is currently looking into this issuepossible bugBug was reported but is not confirmed or is unable to be replicated.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions