Skip to content

Commit f12839f

Browse files
committed
Address CodeRabbit: fix list_forms README wording, use 'is None' for submit_form fallback
1 parent 0c19a8b commit f12839f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ call; the body is streamed in chunks rather than loaded into memory.
368368

369369
| Tool | Permission | Description |
370370
|------|-----------|-------------|
371-
| `list_forms` | read | List forms (filter by ownership: owned / shared / all) |
371+
| `list_forms` | read | List forms (filter by ownership: "owned" or "shared"; omit for both) |
372372
| `get_form` | read | Get a form with questions, options, shares |
373373
| `list_questions` | read | List questions on a form |
374374
| `get_question` | read | Get a single question |

src/nc_mcp_server/tools/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ async def submit_form(form_id: int, answers: dict[str, Any], share_hash: str | N
441441
f"apps/forms/api/v3/forms/{form_id}/submissions",
442442
json_data=body,
443443
)
444-
return json.dumps(data) if data else '{"status": "submitted"}'
444+
return '{"status": "submitted"}' if data is None else json.dumps(data)
445445

446446
@mcp.tool(annotations=ADDITIVE_IDEMPOTENT)
447447
@require_permission(PermissionLevel.WRITE)

0 commit comments

Comments
 (0)