Image — canonical payload contracts
Resize and convert images (JPEG/PNG/WebP) to a staging URL.
Service id: img
Docs: https://mcp.glc-rag.hu/guide/img
Markdown docs: https://mcp.glc-rag.hu/guide/img.md
MCP resource: docs://img/payload
POST https://mcp.glc-rag.hu/mcp. Values below are type slots from the live input schema (e.g. <string, required>), not example data. Fill them from the user task.
RPC result wrapper: result.structuredContent is the object in Output schema. result.isError mirrors structuredContent.is_error.
img_info
Read image width/height/format/mode from url or small base64 (no resize).
Required arguments: (none)
Request contract
{
"jsonrpc": "2.0",
"id": "<integer|string>",
"method": "tools/call",
"params": {
"name": "img_info",
"arguments": {
"url": "<string, optional>",
"content_base64": "<string, optional>"
}
}
}
Input schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Public http(s) or staging image URL"
},
"content_base64": {
"type": "string",
"description": "Small image as base64 or data: URL"
}
},
"additionalProperties": false
}
Output schema (structuredContent on success)
{
"type": "object",
"properties": {
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"format": {
"type": "string"
},
"bytes": {
"type": "integer"
}
},
"additionalProperties": true
}
Error object
{
"type": "object",
"required": [
"error",
"is_error"
],
"properties": {
"error": {
"type": "string"
},
"is_error": {
"type": "boolean",
"const": true
}
},
"additionalProperties": true
}
img_resize
Resize/convert an image and publish the result to staging. Provide url or content_base64, plus width/height/max_edge/scale.
Required arguments: (none)
Request contract
{
"jsonrpc": "2.0",
"id": "<integer|string>",
"method": "tools/call",
"params": {
"name": "img_resize",
"arguments": {
"url": "<string, optional>",
"content_base64": "<string, optional>",
"width": "<integer, optional, minimum 1, maximum 8192>",
"height": "<integer, optional, minimum 1, maximum 8192>",
"max_edge": "<integer, optional, minimum 1, maximum 8192>",
"scale": "<number, optional, minimum 0.01, maximum 8>",
"fit": "<string, optional, enum contain|cover|exact, default 'contain'>",
"format": "<string, optional, enum jpeg|png|webp|keep, default 'keep'>",
"quality": "<integer, optional, default 85, minimum 1, maximum 100>",
"background": "<string, optional, default '#ffffff'>",
"strip_metadata": "<boolean, optional, default True>",
"return_base64": "<boolean, optional, default False>"
}
}
}
Input schema
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"content_base64": {
"type": "string"
},
"width": {
"type": "integer",
"minimum": 1,
"maximum": 8192
},
"height": {
"type": "integer",
"minimum": 1,
"maximum": 8192
},
"max_edge": {
"type": "integer",
"minimum": 1,
"maximum": 8192,
"description": "Cap longest edge (aspect preserved)"
},
"scale": {
"type": "number",
"minimum": 0.01,
"maximum": 8,
"description": "Multiply dimensions (e.g. 0.5)"
},
"fit": {
"type": "string",
"enum": [
"contain",
"cover",
"exact"
],
"default": "contain"
},
"format": {
"type": "string",
"enum": [
"jpeg",
"png",
"webp",
"keep"
],
"default": "keep"
},
"quality": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 85
},
"background": {
"type": "string",
"default": "#ffffff",
"description": "Fill when flattening alpha to jpeg/webp"
},
"strip_metadata": {
"type": "boolean",
"default": true
},
"return_base64": {
"type": "boolean",
"default": false,
"description": "Also include image_base64 (avoid for large outputs)"
}
},
"additionalProperties": false
}
Output schema (structuredContent on success)
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"format": {
"type": "string"
},
"bytes": {
"type": "integer"
}
},
"additionalProperties": true,
"required": [
"url"
]
}
Error object
{
"type": "object",
"required": [
"error",
"is_error"
],
"properties": {
"error": {
"type": "string"
},
"is_error": {
"type": "boolean",
"const": true
}
},
"additionalProperties": true
}
img_status
Image service health and limits.
Required arguments: (none)
Request contract
{
"jsonrpc": "2.0",
"id": "<integer|string>",
"method": "tools/call",
"params": {
"name": "img_status",
"arguments": {}
}
}
Input schema
{
"type": "object",
"properties": {},
"additionalProperties": false
}
Output schema (structuredContent on success)
{
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"additionalProperties": true,
"required": [
"ok"
]
}
Error object
{
"type": "object",
"required": [
"error",
"is_error"
],
"properties": {
"error": {
"type": "string"
},
"is_error": {
"type": "boolean",
"const": true
}
},
"additionalProperties": true
}