create_file_upload

Upload a local file to a repo.

Tools

  • create_file_upload

Parameters

  • repo: repo locator such as `teams/team_slug/repo_slug` or `username/repo_slug`.
  • filename: original filename to store.
  • content_base64: base64-encoded file bytes.
  • description: optional description text.
  • content_type: optional declared content type.

Example

curl -X POST https://ghit.example/api/v1/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "create_file_upload",
      "arguments": {
        "repo": "teams/acme/webapp",
        "filename": "screenshot.png",
        "content_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
        "description": "Build screenshot",
        "content_type": "image/png"
      }
    }
  }'

Notes

  • The tool returns the same upload resource as the REST API.