Create Document
Save a new document node in the specified space and parent folder using provided markdown content or content from an existing text artifact.
## Return Value:
The function returns an object containing:
- docId: The ID of the created document
- nodeId: The ID of the created node (when relationType is NODE)
- name: The name of the created document
- url: The URL to view the document in the browser (when relationType is NODE)
**IMPORTANT**: When the function returns a result with a "url" field, you MUST:
1. Explicitly mention the URL in your response text
2. Format it as a clickable link using markdown format: [Document Name](url)
3. Tell the user they can click the link to view the document
4. Example: "Document created successfully. You can view it by clicking this link: [Document Name](url)"
## the doc params example:
### create from markdown:
{
"sourceType": "markdown",
"markdown": "# title
## content",
"name": "title",
"description": "description"
"relationType": "DATABASE_FIELD" | "NODE" (optional, default is NODE)
}
### create from artifact:
{
"sourceType": "artifact",
"artifactId": "the artifact id of the document",
"name": "title",
"description": "description"
}