Explorer

definy.mcp-part-text

description
The text of the definy_get_part tool
type
Fn(
  part: @definy.snapshot-check-part,
  commit: @definy.event-snapshot,
  names: List<Record{id: String, name: String}>
) -> String
expression
fn(part$0, commit$1, names$2) =>
  @std.string-join(
    items: [
      $0.name,
      " (project ",
      $1.commit.project_name,
      ", branch ",
      $1.commit.branch,
      ", snapshot ",
      $1.event_hash,
      ")\nid: ",
      $0.id,
      "\ncontent hash: ",
      $0.content_hash,
      match $0.content {
        #none(_) =>
          "\nThe content could not be resolved (its definition could not be evaluated here)",
        #some(content$3) =>
          @std.string-join(
            items: [
              "\nvisibility: ",
              match $3.visibility {
                #public(_) =>
                  "public",
                #private(_) =>
                  "private"
              },
              "\ndescription: ",
              @definy.localized-texts-text(texts: $3.description),
              "\n\ntype:\n",
              match $3.part_type {
                #none(_) =>
                  "(none)",
                #some(type$4) =>
                  @definy.expression-text(expression: $4, indent: "", names: $2)
              },
              "\n\nexpression:\n",
              match $3.expression {
                #none(_) =>
                  "(none)",
                #some(expression$5) =>
                  @definy.expression-text(expression: $5, indent: "", names: $2)
              }
            ],
            separator: ""
          )
      }
    ],
    separator: ""
  )
visibility
public
definy.mcp-part-text (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: mEhrss1AEmvFgCxN6p_Ps2uVmXF3U-xHxpHhWu2s_qs
content hash: -FEKM9fn0nLx3JMHrIoXo4kNF1pQa50hPjL25VoVA5I