Skip to content

Python: Clarify tool invocation authorization boundaries - #14647

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 2 commits into
mainfrom
sk-tool-invocation-boundaries
Oct 23, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 2 commits into
mainfrom
sk-tool-invocation-boundaries

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Motivation and Context

Clarify the distinction between function selection and application authorization when using Python tool calling. Applications need actionable guidance on restricting available functions and authorizing model-generated calls before sensitive operations.

Description

Add a tool invocation and authorization section to the Python README covering explicit nonempty allowlists, empty inclusion-list semantics, application authorization and invocation filters, manual approval, and passing the matching function_behavior when manually dispatching calls. Explain that filtering uses current kernel metadata rather than an immutable snapshot of advertised tools.

Documentation only: existing filtered dispatch already rejects nonmember functions before invocation. This change preserves runtime behavior and does not introduce a new authorization mechanism.

Validation:

  • git diff --check origin/main...HEAD — passed.
  • From python: .\.venv\Scripts\python.exe -m pytest tests\unit\kernel\test_kernel.py tests\unit\connectors\ai\test_function_choice_behavior.py -q — passed, 115 tests. Existing dependency/deprecation warnings were emitted, including an OpenAI client cleanup warning.
  • No build, full unit suite, or pre-submission formatting script run; only Markdown documentation changed.

Contribution Checklist

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The documentation matches existing filtering and invocation behavior, with no unresolved issues.

No open issues 🎉

What changed in this PR

This documentation-only update clarifies Python tool-calling authorization boundaries without changing runtime behavior.

Changes:

  • Explains explicit nonempty allowlists, empty-list semantics, and filtering against current kernel metadata.
  • Describes application authorization, invocation filters, manual approval, and preserving function-name filtering during manual dispatch.
File Description
python/​README.md Adds guidance on tool selection, authorization, and safe manual invocation.

Review effort: Balanced

@jpalvarezl Jose Alvarez (jpalvarezl) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Documentation accurately distinguishes function selection from application authorization. The nonempty allowlist, current-kernel metadata check, manual dispatch behavior, and invocation-filter guidance match the Python runtime.

This branch was successfully deployed

1 active and 1 inactive deployments
github-app-auth — 82ccfba0 Deployed Oct 23, 2026 by eavanvalkenburg via add_label #29428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants