> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Create clause reference

> Create a clause reference record in the database. Returns a clauseReferenceId that you can embed in document content using (in extended Markdown) or as a…

`create_clause_reference`

Create a clause reference record in the database. Returns a clauseReferenceId that you can embed in document content using \{\{clauseRef:CLAUSE\_REF\_ID}} (in extended Markdown) or as a \{ type: "clauseReference", attrs: \{ clauseReferenceId: "..." } } node (in TipTap JSON).  WORKFLOW: 1. Call list\_clause\_blocks\_for\_reference to find the target clause's blockId and hierarchy. 2. Call this tool with the target documentId, blockId, and hierarchy. 3. Use the returned clauseReferenceId in your content.  Local references: documentId = the document you are writing content into. Cross-document references: documentId = the OTHER document that contains the target clause.

## Parameters

<ParamField path="documentId" type="string" required>
  ID of the document that CONTAINS the target clause block.
</ParamField>

<ParamField path="blockId" type="string" required>
  The block ID (attrs.id) of the target clause block.
</ParamField>

<ParamField path="hierarchy" type="string" required>
  The hierarchy string of the target clause (e.g. "0.0", "0.1.0").
</ParamField>
