Skip to content

API Reference parrot.tools.userinfo

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.tools.userinfo

View source

UserinfoTool — exposes the session user's EmployeeProfile to the LLM (FEAT-406).

A standard AbstractTool returning the current session user's curated EmployeeProfile (see parrot.auth.userinfo.UserInfoService) as JSON. Identity always comes from the session/PermissionContext propagated by AbstractTool.execute() — never from an LLM-supplied argument (security invariant). See sdd/specs/pbac-guardrails.spec.md §3 Module 5.

Alias AbstractTool

Re-exported from parrot.tools.abstract.AbstractTool.

Alias UserInfoService

Re-exported from parrot.auth.userinfo.UserInfoService.

Class UserinfoTool

Get the current user's profile information.

Returns the session user's structured profile as JSON — name, email, job code, department, groups, programs, worker type, and manager info. Identity is always resolved from the caller's session/permission context; this tool takes no arguments and ignores any identity the LLM might otherwise attempt to supply.

Parameter Type Default Description
service UserInfoService The shared UserInfoService used to load profiles.
**kwargs Any {} Forwarded to AbstractTool.__init__.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally