Overview

Tool Name

git_action

Purpose

The git_action tool provides Git workflows for content your data agents create. It supports file operations, branching, diffs, and history, and can auto-register saved files so they are immediately available to other tools and entities across the platform.

Key Features & Functions

File Operations and Diffs

Read and write repository files, generate diffs, and apply unified patches.

Commit and Branch Management

Create branches, switch context, commit changes, and keep work isolated.

History and Status Tracking

Inspect commit history and working tree status to audit changes.

Save and Register Workflow

Use a single call to save a file from disk into Git and auto-register and attach it.

PDF Parsing

Extract text and metadata from PDFs in your repo or by path.

Input Parameters for Each Function

git_action

Parameters
NameDefinitionFormat
actionGit operation to perform. Supported values: list_files, read_file, write_to_file, save_file, generate_diff, apply_diff, commit, get_history, create_branch, switch_branch, get_branch, get_status, remove_file.String
Action-specific fields
ActionRequired fields
list_filespath (optional filter)
read_filefile_path
write_to_filefile_path, content
save_filesource_path, target_path (optional), target_filename (optional), auto_register (optional), auto_attach_entity_type (optional when auto_register is true), auto_attach_entity_id (optional when auto_register is true)
generate_diffold_content, new_content, context_lines (optional)
apply_difffile_path, diff_content
commitcommit_message
get_historyfile_path (optional), max_count (optional)
create_branchbranch_name
switch_branchbranch_name
get_branch(no additional fields)
get_status(no additional fields)
remove_filefile_path
Prefer action: save_file with auto_register: true to save to Git and automatically register and attach the file in one step.

pdf_parser

Parameters
NameDefinitionFormat
filepathPath or URL to a PDF for extraction.String

Use Cases

  1. Repository curation
    • List and read files to review generated assets before publishing.
  2. Document updates
    • Write content changes to markdown or config files and commit with a clear message.
  3. One-call save
    • Save a local report into the repo and auto-attach it to the current task for review.
  4. Change review
    • Generate a diff, share it for approval, then apply it and commit.
  5. Release preparation
    • Create a feature branch, make changes, and track history for a clean audit trail.
  6. PDF ingest
    • Parse a PDF and store extracted text alongside the original for indexing.
remove_file**and ** apply_diff**can delete or overwrite content. ** Verify targets and keep changes committed to reversible branches.

Workflow/How It Works

  1. Discover
    • list_files to scope the repo or get_status to see pending changes.
  2. Isolate
    • create_branch and switch_branch to work safely on a feature line.
  3. Edit
    • write_to_file for text edits or save_file for efficient binary and one-call save and attach.
  4. Review
    • generate_diff and get_history to validate changes before commit.
  5. Commit
    • commit with a descriptive message and confirm via get_status.
For binary assets, save_file avoids loading file bytes into chat context and pairs well with auto-registration and attachment.

Integration Relevance

  • file_manager_tools to register, attach, download, and paginate file content once saved.
  • project_manager_tools to align commits and artifacts with tasks and milestones.
  • document_index_tools to index committed docs for search and Q&A.
  • artifact_manager_tools to reference generated outputs with durable links.
  • google_drive_tools when you also need to export or mirror key outputs.

Configuration Details

  • Use relative repository paths for file_path fields.
  • Follow branch naming conventions that match your workflow.
  • Write clear commit_message values for traceability.
  • When auto_register is true, provide correct auto_attach_entity_type and auto_attach_entity_id.
  • Keep binary files in appropriate directories to avoid repo bloat.

Limitations or Notes

  1. Repository initialization and permissions are required for all actions.
  2. Large binaries can slow clone and history operations.
  3. Concurrent edits can cause merge conflicts that require manual resolution.
  4. Network connectivity may be required for remotes and external PDF URLs.
  5. Auto-registration depends on the availability of file_manager_tools.
  6. PDF parsing quality varies based on document structure.

Output

  • File Operations
    • Confirmations for create, modify, remove, and the resulting Git status.
  • Diff and Apply
    • Unified diff output and application results.
  • Commit and Branch
    • Commit hash, affected files, and branch confirmations.
  • History and Status
    • Commit lists with timestamps, authors, and messages, plus working tree status.
  • PDF Parsing
    • Extracted text and metadata ready for indexing or analysis.