Skip to content

describe_model

Statically inspect a Python model file and return its declared contract metadata without executing the code. The file is read from the project and parsed with AST analysis only. Specify branch to read from a non-default branch (e.g. a scenario branch). Omitting branch, passing an empty string, or passing null all resolve to the project’s default branch. Passing the branch name explicitly is equivalent. The path parameter is a project-relative file path (e.g. ‘model/revenue.py’). Returns: project (str) — project name; path (str) — file path that was inspected; sha (str) — blob SHA of the file; inputs (list[str]|null) — declared input names; outputs (list[str]|null) — declared output names; dependencies (list[str]|null) — declared upstream model dependencies; warnings (list[str]) — issues found (missing metadata, dynamic values, malformed Python, non-string entries, duplicates, legacy dict outputs, etc.); confidence (str) — ‘high’ | ‘medium’ | ‘low’ | ‘none’.

NameTypeRequiredDefaultDescription
project_namestrYes
pathstrYes
branch`strNone`NoNone

Returns a structured object. Top-level fields:

  • project (string)
  • path (string)
  • sha (string)
  • inputs (array<string>)
  • outputs (array<string>)
  • dependencies (null)
  • warnings (array)
  • confidence (string)

See the response example below for the full payload shape.

{
"name": "describe_model",
"arguments": {
"project_name": "forecasts",
"path": "model/revenue.py"
}
}
{
"project": "forecasts",
"path": "model/revenue.py",
"sha": "abc1234def5678901234567890abcdef12345678",
"inputs": [
"growth_rate"
],
"outputs": [
"revenue"
],
"dependencies": null,
"warnings": [],
"confidence": "high"
}
  • Module: Models
  • Requires authentication via API token or Auth0 JWT.