gitCreateBlob
Create a blob
Details
- Method:
POST - Path:
/repos/{owner}/{repo}/git/blobs - Operation ID:
git/create-blob
Parameters
{
"owner": {
"description": "The account owner of the repository. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"content": {
"description": "The new blob's content.",
"required": true,
"location": "body",
"type": "string"
},
"encoding": {
"description": "The encoding used for `content`. Currently, `\"utf-8\"` and `\"base64\"` are supported.",
"required": false,
"location": "body",
"type": "string"
}
}Response Schema
{
"title": "Short Blob",
"description": "Short Blob",
"type": "object",
"properties": {
"url": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"url",
"sha"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('gitCreateBlob', {
# Add required parameters here
})