GitHub / warm

Get File Contents

Read a file or directory from a repository. For files, returns base64-decoded content + sha. For directories, returns the listing.

Quick Start

aweb inspect github.get_file_contents
aweb add github
aweb plan "use GitHub get file contents in an agent workflow"
import Aweb, { Agent } from '@aweb/sdk';

const aweb = new Aweb({ apiKey: process.env.AWEB_API_KEY });
const agent = new Agent({ tools: aweb.tools });

agent.add('github');

const plan = await agent.plan('Use GitHub for this workflow');
const tool = await aweb.tools.inspect('github.get_file_contents');

console.log(plan.nextAction);
console.log(tool.inputSchema);

Tool Card

Tool idgithub.get_file_contents
ProviderGitHub (github)
Tool nameget_file_contents
Activationwarm
Healthhealthy
Trust score1.00
Transportstreamable_http
Latencynot yet measured
Cost0

Requirements and Governance

Authoauth_2_1_pkce
Credentialsetup_required
Workspacerequired
Approvalnone
RiskREAD
Permissionsrepo, read:org, workflow, read
Credential setup/api/mcp-warehouse/credentials/github/init

Schemas

{
  "type": "object",
  "properties": {
    "owner": {
      "type": "string",
      "description": "Repository owner (user or org)"
    },
    "repo": {
      "type": "string",
      "description": "Repository name"
    },
    "path": {
      "type": "string",
      "description": "File or directory path within the repo"
    },
    "ref": {
      "type": "string",
      "description": "Branch, tag, or commit sha (default: repo default branch)"
    }
  },
  "required": [
    "owner",
    "repo",
    "path"
  ],
  "additionalProperties": false
}

Examples

[
  {
    "objective": "Use GitHub get file contents in an agent workflow.",
    "args": {
      "owner": "<owner>",
      "repo": "<repo>",
      "path": "<path>",
      "ref": "<ref>"
    }
  }
]
Back to MCP Tool Cards