Yo guys, I built an MCP that connects to Semrush for keyword research. It works successfully but there is a problem.
When I connect it to an AI Agent node with Claude, the AI Agent node gives ts error: “Received tool input did not match expected schema”.
Example tool output:
[
{
"response": [
{
"tools": [
{
"name": "domain_overview",
"description": "Get comprehensive domain analysis including organic keywords count, estimated traffic, domain ranking, and basic SEO metrics",
"schema": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "Target domain to analyze (e.g., example.com)"
},
"database": {
"type": "string",
"description": "Geographic database for analysis (default: us). Examples: us, uk, de, fr, tr"
}
},
"required": [
"domain"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "keyword_analysis",
"description": "Comprehensive keyword analysis including search volume, keyword difficulty, CPC, competition level, and related keyword discovery",
"schema": {
"type": "object",
"properties": {
"keyword": {
"type": "string",
"description": "Target keyword to analyze"
},
"database": {
"type": "string",
"description": "Geographic database for analysis (default: us). For Turkish use: tr"
},
"include_related": {
"type": "boolean",
"description": "Include related keywords discovery in the analysis (default: false)"
},
"related_limit": {
"type": "number",
"description": "Number of related keywords to return (max 50, default: 10)"
}
},
"required": [
"keyword"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "competitor_analysis",
"description": "Discover organic competitors and analyze competitive landscape with shared keyword analysis",
"schema": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "Target domain for competitor analysis"
},
"database": {
"type": "string",
"description": "Geographic database for analysis (default: us)"
},
"limit": {
"type": "number",
"description": "Number of competitors to return (max 50, default: 20)"
}
},
"required": [
"domain"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "traffic_analytics",
"description": "Advanced traffic analysis including organic keywords performance, top pages, and traffic insights",
"schema": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "Target domain for traffic analysis"
},
"analysis_type": {
"type": "string",
"description": "Type of traffic analysis to perform"
},
"database": {
"type": "string",
"description": "Geographic database for analysis (default: us)"
},
"limit": {
"type": "number",
"description": "Number of results to return (max 100, default: 20)"
}
},
"required": [
"domain"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "related_keywords_discovery",
"description": "Advanced related keyword discovery tool for content expansion, including semantically related terms, question keywords, and long-tail variations",
"schema": {
"type": "object",
"properties": {
"seed_keyword": {
"type": "string",
"description": "Primary keyword to find related terms for"
},
"match_type": {
"type": "string",
"description": "Type of keyword matching to perform"
},
"database": {
"type": "string",
"description": "Geographic database for analysis (default: us). For Turkish keywords use: tr"
},
"volume_filter": {
"type": "object",
"additionalProperties": {},
"description": "Filter keywords by search volume range"
},
"difficulty_filter": {
"type": "object",
"additionalProperties": {},
"description": "Filter keywords by difficulty range (0-100)"
},
"limit": {
"type": "number",
"description": "Number of related keywords to return (max 100, default: 25)"
}
},
"required": [
"seed_keyword"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
]
}
]
}
]
How can I fix this issue? If you need any other information, just let me know

