Skip to content

Fix: return type contract violation and doc typo in try_download_result tool#1

Open
hyun-hyang wants to merge 1 commit into
DeemosTech:mainfrom
kupl:main
Open

Fix: return type contract violation and doc typo in try_download_result tool#1
hyun-hyang wants to merge 1 commit into
DeemosTech:mainfrom
kupl:main

Conversation

@hyun-hyang

@hyun-hyang hyun-hyang commented Jan 29, 2026

Copy link
Copy Markdown

Bug Report (Issue substitute)

This PR documents and fixes a contract violation bug in the MCP tool
try_download_result.

Issues

  1. Return tuple order and length mismatch with declared return type
  2. Docstring typo ("bu" → "by")

This repository currently has Issues disabled, so this PR serves as
a bug report and fix combined.

Bug Evidence

1. Return type contract violation

Before
Declared return type:

) -> str | tuple[str, Optional[MCPImage], str]:

Actual return value:

  • return "Task not finished yet. Try again later."
  • return (
    returning_image,
    "The image above is an preview image of the generated model, without texture and material.\n"
    f"The assets are downloaded to {parameters.target_directory_path}"
    )

    This violates both tuple length and positional ordering, which is critical
    in MCP environments where tuple order is semantically significant.

After (this PR)

- ) -> str | tuple[str, Optional[MCPImage], str]:
+ ) -> str | tuple[Optional[MCPImage], str]:

2. Docstring typo

- Always make sure an absolute path is given bu the user before calling this tool.

Fix applied in this PR

- Always make sure an absolute path is given bu the user before calling this tool.
+ Always make sure an absolute path is given by the user before calling this tool.

Visual reference (GitHub UI diff)

Screenshot 2026-01-30 at 2 14 19 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant