Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as fynk MCP. If you published it, claim ownership there.

Create document from PDF upload

create-document-from-pdf-upload

Create a new document from a PDF previously uploaded via create-document-pdf-upload-url.

Use this tool when:

  • The user wants to import an existing PDF into fynk as a draft document for further processing, OR

  • The user wants to record an already-signed PDF in fynk by setting initial_stage to "done"

Call create-document-pdf-upload-url first to obtain file_upload_uuid, then upload the PDF to the URL it returns with a multipart/form-data POST, as that tool describes, and call this tool only once that upload has succeeded. Each file_upload_uuid is single-use: it is consumed by a successful call, or by a call refused because the file is not a valid PDF or exceeds the page limit. To create another document (or upload a replacement file), call create-document-pdf-upload-url again. If a call is refused over any other argument, the upload remains intact—fix the argument and retry with the same file_upload_uuid. initial_stage is required and must be either "draft" or "done"; ask the user which they want if it isn't clear from context. Depending on the account's settings, template_uuid may be required (it copies checkpoints, document type, metadata, parties, etc. from a template).

Only pass auto_apply_ai_analysis when the user has expressed whether AI analysis results should be applied to the document automatically; omit it to use the account's default setting. The AI analysis runs in the background after this tool returns; read its state from the ai_analysis section of get-document-info before relying on the parties, metadata or summary it fills in.

The template_uuid, team_uuids, tag_uuids, and account_party_uuid arguments expect UUIDs, which can be discovered via list-templates, list-account-teams, list-account-tags, and list-account-parties respectively.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_upload_uuid": "<file_upload_uuid>",
      "file_name": "<file_name>",
      "initial_stage": "<initial_stage>"
    },
    "name": "create-document-from-pdf-upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_nameYesThe name of the file being uploaded
tag_uuidsNoUUIDs of the tags to apply to the document. UUIDs can be obtained from list-account-tags
team_uuidsNoUUIDs of the teams to assign the document to. May be required depending on the account's settings. UUIDs can be obtained from list-account-teams
document_nameNoThe name of the new document. If omitted, the file_name will be used. Ask the user if they would like to give their own name for the document
initial_stageYesThe new document will be created in this stage. Prompt the user for this if they don't supply it
template_uuidNoUUID of the template to copy Checkpoints, document type, metadata, parties, etc from. If present, must be one of the template UUIDs returned by list-templates. May be required depending on the account's settings.
file_upload_uuidYesThe `file_upload_uuid` returned by create-document-pdf-upload-url
account_party_uuidNoOptional UUID of the account party to add to the document as the internal party. UUID can be obtained from list-account-parties
auto_apply_ai_analysisNoIf true, results of the AI analysis of the document (metadata, parties, etc.) are applied to the document automatically instead of being left for manual review. If not sent, the account's auto_apply_ai_analysis_by_default setting from get-account-info is used.

Output Schema

NameRequiredDescriptionDefault
urlNoURL to open the document in fynk
nameNoName of the document
tagsNoThe tags on the document. Tags are the account's own classification labels (e.g. relationship type, commercial significance, region), so they show which categories this account uses and can be filtered on in list-documents.
uuidNoUnique identifier for the document. Do not show to the user unless they ask for it
stageNoWhat stage the document is in currently
teamsNoThe teams the document is assigned to.
localeNoLocale code, e.g. en-GB, de-AT. Absent when the document has none set. Prefer describing the locale in natural language (e.g. 'British English') rather than showing the raw code.
originNoHow the document was created.
partiesNoThe contracting entities on the document.
conditionsNoThe document's conditions: rules over its dynamic fields deciding whether a passage of the document applies, and whether each currently holds. Use them to explain why a clause is or is not part of the document, and what would have to change to flip it.
created_atNoWhen the document was created.
updated_atNoWhen the document was last updated.
ai_analysisNoThe state of the document's latest AI analysis, which reads a PDF to fill in the document's parties, metadata, summary, etc. Creating a document from a PDF starts one, and it runs asynchronously. Absent when the document has never been analysed.
archived_atNoWhen the document was archived. Absent when the document is not archived.
attachmentsNoThe files attached to the document. Attachments are part of the document itself and visible to external parties.
signatoriesNoThe individual people who sign the document. Distinct from parties: a signatory often signs on behalf of a party (e.g. a business), so a person may be a signatory without appearing as a party.
_entity_typeNoOnly relevant for tooling. Do not show to the user
stored_filesNoThe files in the document's internal file storage, as opposed to its attachments. It includes files uploaded in the document's comments. The app shows these files as "Internal file storage": call them that when talking to the user, never "stored files".
summary_textNoA summary of the document content. Absent when the document has no summary.
document_typeNoIf present, indicates what kind of document this is. Absent when the document has no type assigned
document_usersNoEveryone with access to the document, each with their access level (role). Signatories are document users too, and appear here with is_signatory true.
dynamic_fieldsNoThe document's dynamic fields and their values.
signature_typeNoeIDAS assurance level used when signing the document. Absent when none has been chosen.
workflow_stateNoGives an indication of which stage transitions, etc are possible to perform on this document. This object is technical state, not display content: when relaying it to the user, always render it as natural-language prose and never echo raw field names or snake_case values (e.g. say 'signing cannot be started yet because not every signature block has been assigned to a signatory' instead of mentioning 'can_start_signing' or 'signature_block_signatory').
metadata_valuesNoThe document's metadata fields and their values.
signature_blocksNoThe places in the document that are signed. A block is bound either to a single signatory or to a party, in which case every signatory of that party signs it. Every signatory needs a block covering them before signing can be started.
sequential_signingNoWhen true, signatories sign one at a time, in ascending order of their signing_order.
source_template_uuidNoUUID of the template the document was created from. Absent when it was not created from a template.
external_reviewer_invitation_messageNoText fynk adds to the invitation email to a document user without a fynk user in this account, when the invitation is sent without an invitation_message of its own. Absent when no text is set.
external_signatory_invitation_messageNoText shown in the email inviting external signatories to sign. Absent when no message is set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / file_upload_uuid / description
      Previous value: -"UUID given by create-document-pdf-upload-url"New value: +"The `file_upload_uuid` returned by create-document-pdf-upload-url"
  2. Changed1 schema field changed
    • addedOutput schema / properties / ai_analysis
      Added value: +{
      +  "description": "The state of the document's latest AI analysis, which reads a PDF to fill in the document's parties, metadata, summary, etc. Creating a document from a PDF starts one, and it runs asynchronously. Absent when the document has never been analysed.",
      +  "properties": {
      +    "applied_at": {
      +      "description": "When the results were applied to the document. Absent when they have not been applied.",
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "auto_apply": {
      +      "description": "When true, the results are applied to the document automatically once the analysis finishes. When false, a user has to review and apply them in the app.",
      +      "type": "boolean"
      +    },
      +    "completed_at": {
      +      "description": "When the analysis finished and its proposed changes became available. Absent while the analysis is in progress and when it produced no results. Read status, not this field, to tell whether the analysis succeeded.",
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "description": "When the analysis was started.",
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "failed_at": {
      +      "description": "When the analysis failed. Absent when it has not failed, and also for some failures such as failed_encrypted and failed_too_many_pages, so read status to tell whether it failed.",
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Where the analysis stands. created, pending, executing: still in progress. review: finished, but the proposed changes wait for a user to review and apply them in the app (with auto_apply true, the automatic apply could not run, e.g. because the document is locked). reviewed: reviewed by a user, not yet applied. applied: the results are on the document. failed, failed_encrypted (password-protected PDF), failed_too_many_pages, unprocessable, expired, document_deleted: no results. This is technical state, not display content: when relaying it to the user, always render it as natural-language prose and never echo raw field names or snake_case values (e.g. say 'the analysis failed because the PDF is password protected' instead of mentioning 'failed_encrypted').",
      +      "enum": [
      +        "created",
      +        "pending",
      +        "executing",
      +        "review",
      +        "reviewed",
      +        "applied",
      +        "failed",
      +        "failed_encrypted",
      +        "failed_too_many_pages",
      +        "expired",
      +        "unprocessable",
      +        "document_deleted"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • addedOutput schema / properties / document_users
      Added value: +{
      +  "description": "Everyone with access to the document, each with their access level (role). Signatories are document users too, and appear here with is_signatory true.",
      +  "items": {
      +    "properties": {
      +      "_entity_type": {
      +        "description": "Only relevant for tooling. Do not show to the user",
      +        "enum": [
      +          "document_user"
      +        ],
      +        "type": "string"
      +      },
      +      "email": {
      +        "description": "Email of the document user",
      +        "type": "string"
      +      },
      +      "internal_user": {
      +        "description": "true if the user has a fynk user in this account",
      +        "type": "boolean"
      +      },
      +      "invitation_status": {
      +        "description": "Whether the user has been invited to the document, as prose that can be presented to the user",
      +        "type": "string"
      +      },
      +      "is_signatory": {
      +        "description": "true if the user is also a signatory of the document",
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "description": "Name of the document user",
      +        "type": "string"
      +      },
      +      "party_uuid": {
      +        "description": "UUID of the party this user belongs to. Absent when they belong to none. Do not show to the user (as the raw UUID) unless they ask for it",
      +        "type": "string"
      +      },
      +      "role": {
      +        "description": "The user's access level on the document. Independent of is_signatory: a viewer may also be a signatory",
      +        "enum": [
      +          "owner",
      +          "collaborator",
      +          "viewer"
      +        ],
      +        "type": "string"
      +      },
      +      "uuid": {
      +        "description": "Do not show to the user unless they ask for it",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / external_reviewer_invitation_message
      Added value: +{
      +  "description": "Text fynk adds to the invitation email to a document user without a fynk user in this account, when the invitation is sent without an invitation_message of its own. Absent when no text is set.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / tags / description
      Previous value: -"The tags on the document. Tags are the account's own classification labels (e.g. relationship type, commercial significance, region), so they show which categories this account uses and can be filtered on with filter_tags."New value: +"The tags on the document. Tags are the account's own classification labels (e.g. relationship type, commercial significance, region), so they show which categories this account uses and can be filtered on in list-documents."
  4. Changed5 schema fields changed
    • addedOutput schema / properties / attachments
      Added value: +{
      +  "description": "The files attached to the document. Attachments are part of the document itself and visible to external parties.",
      +  "items": {
      +    "properties": {
      +      "_entity_type": {
      +        "description": "Only relevant for tooling. Do not show to the user",
      +        "enum": [
      +          "attachment"
      +        ],
      +        "type": "string"
      +      },
      +      "file_size": {
      +        "description": "Size of the file in bytes. Use file_size_display when telling the user the size",
      +        "type": "integer"
      +      },
      +      "file_size_display": {
      +        "description": "Size of the file formatted for display, e.g. \"2.4 MB\"",
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Name of the file",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "description": "SHA-256 digest of the file's bytes, as lowercase hex. Equal digests mean byte-identical files. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      },
      +      "uuid": {
      +        "description": "Identifier for the attachment. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / stored_files
      Added value: +{
      +  "description": "The files in the document's internal file storage, as opposed to its attachments. It includes files uploaded in the document's comments. The app shows these files as \"Internal file storage\": call them that when talking to the user, never \"stored files\".",
      +  "items": {
      +    "properties": {
      +      "_entity_type": {
      +        "description": "Only relevant for tooling. Do not show to the user",
      +        "enum": [
      +          "stored_file"
      +        ],
      +        "type": "string"
      +      },
      +      "file_size": {
      +        "description": "Size of the file in bytes. Use file_size_display when telling the user the size",
      +        "type": "integer"
      +      },
      +      "file_size_display": {
      +        "description": "Size of the file formatted for display, e.g. \"2.4 MB\"",
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Name of the file",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "description": "SHA-256 digest of the file's bytes, as lowercase hex. Equal digests mean byte-identical files. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      },
      +      "uuid": {
      +        "description": "Identifier for the stored file. Do not show to the user unless they ask for it",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / workflow_state / properties / stage_transitions / properties / done / properties / blockers / items / properties / records / items / properties / _entity_type / enum
      Previous value: -[
      -  "account",
      -  "account_party",
      -  "account_profile",
      -  "account_user",
      -  "automation",
      -  "condition",
      -  "custom_widget",
      -  "dashboard",
      -  "document",
      -  "document_type",
      -  "document_user",
      -  "document_user_suggestion",
      -  "dynamic_field",
      -  "import",
      -  "metadata",
      -  "metadata_value",
      -  "party",
      -  "party_suggestion",
      -  "playbook",
      -  "signature_block",
      -  "stored_file",
      -  "tag",
      -  "team",
      -  "template",
      -  "user"
      -]New value: +[
      +  "account",
      +  "account_party",
      +  "account_profile",
      +  "account_user",
      +  "attachment",
      +  "automation",
      +  "condition",
      +  "custom_widget",
      +  "dashboard",
      +  "document",
      +  "document_type",
      +  "document_user",
      +  "document_user_suggestion",
      +  "dynamic_field",
      +  "import",
      +  "metadata",
      +  "metadata_value",
      +  "party",
      +  "party_suggestion",
      +  "playbook",
      +  "signature_block",
      +  "stored_file",
      +  "tag",
      +  "team",
      +  "template",
      +  "user"
      +]
    • changedOutput schema / properties / workflow_state / properties / stage_transitions / properties / review / properties / blockers / items / properties / records / items / properties / _entity_type / enum
      Previous value: -[
      -  "account",
      -  "account_party",
      -  "account_profile",
      -  "account_user",
      -  "automation",
      -  "condition",
      -  "custom_widget",
      -  "dashboard",
      -  "document",
      -  "document_type",
      -  "document_user",
      -  "document_user_suggestion",
      -  "dynamic_field",
      -  "import",
      -  "metadata",
      -  "metadata_value",
      -  "party",
      -  "party_suggestion",
      -  "playbook",
      -  "signature_block",
      -  "stored_file",
      -  "tag",
      -  "team",
      -  "template",
      -  "user"
      -]New value: +[
      +  "account",
      +  "account_party",
      +  "account_profile",
      +  "account_user",
      +  "attachment",
      +  "automation",
      +  "condition",
      +  "custom_widget",
      +  "dashboard",
      +  "document",
      +  "document_type",
      +  "document_user",
      +  "document_user_suggestion",
      +  "dynamic_field",
      +  "import",
      +  "metadata",
      +  "metadata_value",
      +  "party",
      +  "party_suggestion",
      +  "playbook",
      +  "signature_block",
      +  "stored_file",
      +  "tag",
      +  "team",
      +  "template",
      +  "user"
      +]
    • changedOutput schema / properties / workflow_state / properties / stage_transitions / properties / signing / properties / blockers / items / properties / records / items / properties / _entity_type / enum
      Previous value: -[
      -  "account",
      -  "account_party",
      -  "account_profile",
      -  "account_user",
      -  "automation",
      -  "condition",
      -  "custom_widget",
      -  "dashboard",
      -  "document",
      -  "document_type",
      -  "document_user",
      -  "document_user_suggestion",
      -  "dynamic_field",
      -  "import",
      -  "metadata",
      -  "metadata_value",
      -  "party",
      -  "party_suggestion",
      -  "playbook",
      -  "signature_block",
      -  "stored_file",
      -  "tag",
      -  "team",
      -  "template",
      -  "user"
      -]New value: +[
      +  "account",
      +  "account_party",
      +  "account_profile",
      +  "account_user",
      +  "attachment",
      +  "automation",
      +  "condition",
      +  "custom_widget",
      +  "dashboard",
      +  "document",
      +  "document_type",
      +  "document_user",
      +  "document_user_suggestion",
      +  "dynamic_field",
      +  "import",
      +  "metadata",
      +  "metadata_value",
      +  "party",
      +  "party_suggestion",
      +  "playbook",
      +  "signature_block",
      +  "stored_file",
      +  "tag",
      +  "team",
      +  "template",
      +  "user"
      +]
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say readOnlyHint=false, idempotentHint=false, destructiveHint=false; the description goes well beyond by disclosing single-use semantics for file_upload_uuid — consumed on success or on a refusal for invalid PDF/page-limit, but preserved when refused for other arguments, in which case retry with the same UUID. It also explains that AI analysis runs asynchronously after return and must be read via get-document-info, and that template_uuid may be conditionally required by account settings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence, then scannable bullets for the two use cases, then prerequisite/retry ordering, then per-argument notes — a sensible sequence for a 9-parameter tool. Length is justified by the conditional behavior, with only mild repetition between the trailing UUID sentence and the schema descriptions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values needn't be described; the description instead covers everything an agent needs before calling — the mandatory two-step upload flow, retry semantics on failure, conditional template requirement, and the deferred AI analysis state. A mutation tool with these preconditions is fully specified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning on top — why initial_stage must be 'draft' or 'done' and that the user should be asked, when to pass versus omit auto_apply_ai_analysis, and which sibling listing tool supplies each UUID argument. Some of the UUID-discovery text duplicates what the schema already states, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a new document from a PDF previously uploaded via create-document-pdf-upload-url'), which immediately differentiates it from create-document-from-scratch and create-document-from-template siblings by naming the input source and prerequisite. An agent can select it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use this tool when:' bullets enumerate both scenarios (import PDF as draft, record an already-signed PDF with initial_stage='done'), and the description specifies the ordering constraint with create-document-pdf-upload-url plus the exact upload step that must succeed first. Nothing is left to inference about when to call it versus its siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources