Skip to content

Github integraiton documentation fix: use result.data otherwise CallToolResult not scriptable#3753

Merged
jlowin merged 1 commit intoPrefectHQ:mainfrom
C-Research:github-client-doc-fix
Apr 3, 2026
Merged

Github integraiton documentation fix: use result.data otherwise CallToolResult not scriptable#3753
jlowin merged 1 commit intoPrefectHQ:mainfrom
C-Research:github-client-doc-fix

Conversation

@c4jquick
Copy link
Copy Markdown
Contributor

@c4jquick c4jquick commented Apr 3, 2026

Description

i think the return type of CallToolResult has changed but wasnt reflected in the docs. Need to use result.data dict to access keys otherwise this example fails

Traceback (most recent call last):
  File "/Users/dardanus/Projects/mcc/client.py", line 18, in <module>
    asyncio.run(main())
  File "/Users/dardanus/.asdf/installs/python/3.10.18/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Users/dardanus/.asdf/installs/python/3.10.18/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/dardanus/Projects/mcc/client.py", line 14, in main
    print(f"GitHub user: {result['github_user']}")
TypeError: 'CallToolResult' object is not subscriptable

just a oneline fix in the docs so that the example works:

client.py

Closes #

Contribution type

  • Bug fix (simple, well-scoped fix for a clearly broken behavior)
  • [ X] Documentation improvement
  • Enhancement (maintainers typically implement enhancements — see CONTRIBUTING.md)

Checklist

  • [ X] This PR addresses an existing issue (or fixes a self-evident bug)
  • [X ] I have read CONTRIBUTING.md
  • I have added tests that cover my changes
  • I have run uv run prek run --all-files and all checks pass
  • [ X] I have self-reviewed my changes
  • If I used an LLM, it followed the repo's contributing conventions (not generic output)

@c4jquick c4jquick changed the title Github integraiton documentation fix: use result.object otherwise CallToolResult not scriptable Github integraiton documentation fix: use result.data otherwise CallToolResult not scriptable Apr 3, 2026
@marvin-context-protocol marvin-context-protocol Bot added the documentation Updates to docs, examples, or guides. Primary change is documentation-related. label Apr 3, 2026
Copy link
Copy Markdown
Member

@jlowin jlowin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jlowin jlowin merged commit 927a03b into PrefectHQ:main Apr 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to docs, examples, or guides. Primary change is documentation-related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants