Skip to content

Commit 0b45f31

Browse files
committed
fix devcontainer file
1 parent fc772b2 commit 0b45f31

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// Features to add to the dev container. More info: https://containers.dev/features.
1010
"features": {
1111
"ghcr.io/devcontainers/features/github-cli:1": {},
12-
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
1312
"ghcr.io/rails/devcontainer/features/postgres-client": {}
1413
},
1514

app/tools/posts/create_tool.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ class CreateTool < MCP::Tool
77
properties: {
88
title: {
99
type: "string",
10-
description: "Título da postagem (obrigatório)"
10+
description: "Título da postagem (obrigatório)",
11+
minLength: 3,
12+
maxLength: 255
1113
},
1214
description: {
1315
type: "string",
14-
description: "Descrição/conteúdo da postagem (obrigatório)"
16+
description: "Descrição/conteúdo da postagem (obrigatório)",
17+
minLength: 10,
18+
maxLength: 10000
1519
}
1620
},
1721
required: [ "title", "description" ]

test/requests/mcp_posts_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ class McpControllerTest < ActionDispatch::IntegrationTest
293293
json_response = JSON.parse(response.body)
294294

295295
# Validar estrutura de erro da tool
296-
content = json_response.dig("result", "content")
297-
tool_result = JSON.parse(content.first["text"])
298-
299-
assert_not tool_result["success"]
300-
assert_includes tool_result["message"], "Erro ao criar post"
296+
content = json_response.dig("error", "data")
297+
assert_match(
298+
/Invalid arguments: The property '#\/description' was not of a minimum string length of 10 in schema/i,
299+
content
300+
)
301301
end
302302

303303
test "should handle post not found on update" do

0 commit comments

Comments
 (0)