MCPcopy
hub / github.com/openai/openai-agents-python / _format_schema_summary

Function _format_schema_summary

src/agents/agent_tool_input.py:160–168  ·  view source on GitHub ↗
(summary: _SchemaSummary)

Source from the content-addressed store, hash-verified

158
159
160def _format_schema_summary(summary: _SchemaSummary) -> str:
161 lines: list[str] = []
162 if summary.description:
163 lines.append(f"Description: {summary.description}")
164 for field in summary.fields:
165 requirement = "required" if field.required else "optional"
166 suffix = f" - {field.description}" if field.description else ""
167 lines.append(f"- {field.name} ({field.type}, {requirement}){suffix}")
168 return "\n".join(lines)
169
170
171def _summarize_json_schema(schema: dict[str, Any]) -> _SchemaSummary | None:

Callers 1

_build_schema_summaryFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected