Skip to content

feat(google_adk): add ADK-115, ADK-116 tool description quality rules - #89

Open
bradAGI wants to merge 1 commit into
trustabl:mainfrom
bradAGI:feat/adk-description-quality
Open

bradAGI wants to merge 1 commit into
trustabl:mainfrom
bradAGI:feat/adk-description-quality

Conversation

@bradAGI

@bradAGI bradAGI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Ports the CSDK-017/018 description-quality pair (merged in #40) to the Google ADK. ADK-001 only checks that a docstring exists, so a tool whose docstring reads """TODO: describe this tool.""" or """Gets data.""" passes today while giving the model no selection signal.

Two ADK-specific points:

  • The docstring does double duty. The ADK parses it for the per-parameter descriptions that accompany the generated schema, so a placeholder or one-clause docstring strips argument-level guidance at the same time as tool-level guidance. Both fixes ask for documented parameters, not just a longer summary.
  • In an agent tree, mis-selection doesn't stay local. A tool picked wrongly inside one branch produces output the following agents treat as established fact — the error gets laundered into shared session state rather than surfacing where it began.

ADK-116 also names the mitigation people would reach for and why it isn't one: ADK-102 and ADK-107's before_tool_callback can block a call it recognizes as wrong, but it can't supply the judgment the description was meant to provide. A callback doesn't compensate for a thin description.

Numbered ADK-115/116 to leave room for ADK-111 in the open PR #51 and the IDs used by my other open PRs (#79, #86).

Verification — engine built at main:

$ trustabl rules validate .
OK: 85 rule pack(s), 208 rule(s) valid under rule schema version 14

Fire (one FunctionTool-wrapped function with """TODO: describe this tool.""", one with """Gets data."""): ADK-115, ADK-116, ADK-201
Silent (full docstring with an Args: section): ADK-201

ADK-116 pairs description_length_lt: 40 with has_docstring: true so it doesn't double-report against ADK-001 on an empty docstring, same as CSDK-018.

No new predicates, so no schema_version bump.

Ports the CSDK-017/018 description-quality pair to the Google ADK.
ADK-001 only checks that a docstring exists, so a tool whose docstring
reads "TODO" or "Gets data." passes today while giving the model no
selection signal.

Two ADK-specific points. The ADK parses the docstring for the
per-parameter descriptions that accompany the generated schema, so a
placeholder or one-clause docstring strips argument-level guidance at the
same time as tool-level guidance. And in an agent tree the mis-selection
does not stay local: a tool picked wrongly inside one branch produces
output the following agents treat as established fact, so the error is
laundered into shared session state rather than surfacing where it began.
ADK-102/107's before_tool_callback can block a call it recognizes as
wrong but cannot supply the judgment the description was meant to give.

Numbered ADK-115/116 to leave room for ADK-111 in the open PR trustabl#51 and the
IDs used by my other open PRs.
@jhumel-code

Copy link
Copy Markdown
Collaborator

Thanks @bradAGI, this is a clean port. Both predicates already exist on main, so you are right that no schema_version bump belongs here, and adk_function_tool is a valid applies_to at tool scope. Severity and confidence match CSDK-017/018 and ADK-001 in the same pack, and neither ID is claimed by another open PR.

What I appreciated is that you did not just copy the Claude framing across. The docstring doing double duty for the per-parameter descriptions, and the point that before_tool_callback can block a wrong call but cannot supply the judgment a thin description was meant to carry, are both ADK-specific and both correct.

Two non-blocking observations. A placeholder docstring under 40 characters will report under ADK-115 and ADK-116 both, which is exactly what CSDK-017/018 do today, so I am fine keeping parity. And the todo needle will match a genuine docstring for a todo-list tool, also inherited, and low severity at 0.85 absorbs it.

Before this ships it needs a rationale doc in trustabl-rulebook under google_adk. That part is ours, not a demand on you, and I am happy to pair on it. I will land this together with the engine half, trustabl/agent-reliability-analyzer#166, so rules-sync stays green.

ivanpaghubasan pushed a commit to ivanpaghubasan/agent-reliability-analyzer that referenced this pull request Sep 22, 2026
Engine half of a coordinated pair with trustabl/agent-reliability-rules#89, on a
branch of the same name so the rules-sync job resolves the matching pack
rather than main. Neither half should merge alone — check-rules-sync.sh
fails if they do.

Mirrors google_adk/tool_definition.yaml into testdata/rules-fixture and adds
cases to policyRuleCases, as TestPolicyRules_AllRulesCovered requires.

Five cases rather than four. ADK-116 pairs description_length_lt with
has_docstring so an absent docstring stays ADK-001's finding instead of
double-reporting — an empty description is length 0, which is also under
the threshold — and the fifth case is what pins that guard.

This branch has not been deployed

No deployments
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.

2 participants