docs(get_connection): point to SHS, fetch_url, and the full field set

Old description was thin and only mentioned yarn_rm_url / auth_type
as the things to look up. That was written before we added
history_server_url and url_allowlist, and before fetch_url and
list_applications existed.

New description explicitly enumerates the connection fields an
agent is most likely to need (yarn_rm_url, history_server_url,
url_allowlist, auth_*, master/deploy_mode/spark_conf) and names
the tools that consume them (get_external_*, fetch_url,
list_applications, prepare_submit_job) so the LLM knows to call
get_connection first when it needs any of those.

Also adds a security note that the response includes secrets
(auth_password, auth_keytab) — the previous description didn't
warn about this.

Tests: 398 passed, no test changes (description text is not
asserted).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-07-09 16:26:54 +08:00
co-authored by Claude Fable 5
parent 8ededc50a9
commit 59cab3346e
+11 -4
View File
@@ -426,10 +426,17 @@ def _list_connections(_req: EmptyRequest = EmptyRequest()):
operation_id="get_connection",
summary="Get a single connection by name",
description=(
"Return the Connection record, or 404 if not found. Useful to "
"verify a connection was saved correctly, or to inspect the "
"resolved yarn_rm_url / auth_type before submitting a job or "
"calling one of the get_external_* tools."
"Return the full Connection record, or 404 if not found. **Call this "
"whenever you need any cluster-level config** — common lookups: "
"yarn_rm_url (YARN RM endpoint), history_server_url (Spark History "
"Server), url_allowlist (which hosts fetch_url may access), "
"auth_type / auth_user / ssl_verify (for any YARN REST or HTTP call), "
"master / deploy_mode / spark_conf (for prepare_submit_job).\n\n"
"The response is a full Pydantic model dump — all fields including "
"secrets (auth_password, auth_keytab). Treat it as sensitive. "
"Useful to verify a connection was saved correctly, or to discover "
"the right endpoint to call before invoking get_external_*, "
"fetch_url, or list_applications."
),
)
def _get_connection(req: ConnectionNameRequest):