Skip to content

amazon-sns-sqs-mcp-server: get_queue_attributes tool has incorrect parameter validation - AttributeNames should accept array/list, not string #978

@fbridger

Description

@fbridger

Describe the bug

Bug Description
The get_queue_attributes tool in the AWS SNS/SQS MCP Server has a schema validation bug where the AttributeNames parameter is defined as a string type, but the underlying AWS SQS API requires it to be a list/array.

Expected Behavior

The [AttributeNames] parameter should accept:

  • ["All"] to get all queue attributes
  • ["ApproximateNumberOfMessages", "VisibilityTimeout", "DelaySeconds"] for specific attributes
  • An array/list format as per AWS SQS API specification

Current Behavior

The tool's schema validation forces AttributeNames to be a string, causing parameter validation errors when trying to pass the correct AWS API format.

Error Messages

{
  "error": "Parameter validation failed:\nInvalid type for parameter AttributeNames, value: All, type: <class 'str'>, valid types: <class 'list'>, <class 'tuple'>"
}

Reproduction Steps

Configure the AWS SNS/SQS MCP Server with version awslabs.amazon-sns-sqs-mcp-server@2.0.4
Attempt to call get_queue_attributes with any of these parameter formats:
Observe parameter validation error

Environment

  • MCP Server Version: awslabs.amazon-sns-sqs-mcp-server@2.0.4
  • Installation Method: UVX (uvx --from awslabs.amazon-sns-sqs-mcp-server@latest)
  • AWS Region: eu-west-1
  • Python Version: 3.10+

Root Cause

The tool's parameter schema incorrectly defines AttributeNames as a string type, while the AWS SDK correctly expects it as a list/tuple. This creates a mismatch between the schema validation and the actual AWS API requirements.

Possible Solution

Suggested Fix
Update the tool's parameter schema to define [AttributeNames] as an array/list type instead of string type, matching the AWS SQS API specification.

Additional Information/Context

No response

OS

Windows 11

Server

amazon-sns-sqs-mcp-server

Server Version

2.0.4

Region experiencing the issue

us-west-1

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions