Skip to main content
Glama

AgentMode

Official
by agentmode
GitHub.json25.2 kB
{ "resources": [ { "server_url": "https://api.github.com", "path": "/repos/{owner}/{repo}/contents/{path}", "method": "get", "parameters": [ { "$ref": "#/components/parameters/owner", "schema": { "name": "owner", "description": "The account owner of the repository. The name is not case sensitive.", "in": "path", "required": true, "schema": { "type": "string" } } }, { "$ref": "#/components/parameters/repo", "schema": { "name": "repo", "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", "in": "path", "required": true, "schema": { "type": "string" } } }, { "name": "path", "description": "path parameter", "in": "path", "required": true, "schema": { "type": "string" }, "x-multi-segment": true }, { "name": "ref", "description": "The name of the commit/branch/tag. Default: the repository\u2019s default branch.", "in": "query", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Response", "content": { "application/vnd.github.object": { "schema": { "title": "Content Tree", "description": "Content Tree", "type": "object", "properties": { "type": { "type": "string" }, "size": { "type": "integer" }, "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "content": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "git_url": { "type": "string", "format": "uri", "nullable": true }, "html_url": { "type": "string", "format": "uri", "nullable": true }, "download_url": { "type": "string", "format": "uri", "nullable": true }, "entries": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "size": { "type": "integer" }, "name": { "type": "string" }, "path": { "type": "string" }, "sha": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "git_url": { "type": "string", "format": "uri", "nullable": true }, "html_url": { "type": "string", "format": "uri", "nullable": true }, "download_url": { "type": "string", "format": "uri", "nullable": true }, "_links": { "type": "object", "properties": { "git": { "type": "string", "format": "uri", "nullable": true }, "html": { "type": "string", "format": "uri", "nullable": true }, "self": { "type": "string", "format": "uri" } }, "required": [ "git", "html", "self" ] } }, "required": [ "_links", "git_url", "html_url", "download_url", "name", "path", "sha", "size", "type", "url" ] } }, "encoding": { "type": "string" }, "_links": { "type": "object", "properties": { "git": { "type": "string", "format": "uri", "nullable": true }, "html": { "type": "string", "format": "uri", "nullable": true }, "self": { "type": "string", "format": "uri" } }, "required": [ "git", "html", "self" ] } }, "required": [ "_links", "git_url", "html_url", "download_url", "name", "path", "sha", "size", "type", "url" ] }, "examples": { "response-if-content-is-a-file": { "$ref": "#/components/examples/content-file-response-if-content-is-a-file" }, "response-if-content-is-a-directory": { "$ref": "#/components/examples/content-file-response-if-content-is-a-directory-object" } } }, "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/content-directory" }, { "$ref": "#/components/schemas/content-file" }, { "$ref": "#/components/schemas/content-symlink" }, { "$ref": "#/components/schemas/content-submodule" } ], "discriminator": { "propertyName": "type", "mapping": { "array": "#/components/schemas/content-directory", "file": "#/components/schemas/content-file", "symlink": "#/components/schemas/content-symlink", "submodule": "#/components/schemas/content-submodule" } } }, "examples": { "response-if-content-is-a-file": { "$ref": "#/components/examples/content-file-response-if-content-is-a-file" }, "response-if-content-is-a-directory": { "$ref": "#/components/examples/content-file-response-if-content-is-a-directory" }, "response-if-content-is-a-symlink": { "$ref": "#/components/examples/content-file-response-if-content-is-a-symlink" }, "response-if-content-is-a-submodule": { "$ref": "#/components/examples/content-file-response-if-content-is-a-submodule" } } } } }, "404": { "$ref": "#/components/responses/not_found" }, "403": { "$ref": "#/components/responses/forbidden" }, "302": { "$ref": "#/components/responses/found" }, "304": { "$ref": "#/components/responses/not_modified" } }, "request_body_parameters": {}, "description": "Gets the contents of a file or directory in a repository. Specify the file path or directory with the `path` parameter. If you omit the `path` parameter, you will receive the contents of the repository's root directory.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw file contents for files and symlinks.\n- **`application/vnd.github.html+json`**: Returns the file contents in HTML. Markup languages are rendered to HTML using GitHub's open-source [Markup library](https://github.com/github/markup).\n- **`application/vnd.github.object+json`**: Returns the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an `entries` attribute containing the array of objects.\n\nIf the content is a directory, the response will be an array of objects, one object for each item in the directory. When listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value _should_ be \"submodule\". This behavior exists [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as \"submodule\".\n\nIf the content is a symlink and the symlink's target is a normal file in the repository, then the API responds with the content of the file. Otherwise, the API responds with an object describing the symlink itself.\n\nIf the content is a submodule, the `submodule_git_url` field identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) and the github.com URLs (`html_url` and `_links[\"html\"]`) will have null values.\n\n**Notes**:\n\n- To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/git/trees#get-a-tree).\n- This API has an upper limit of 1,000 files for a directory. If you need to retrieve\nmore files, use the [Git Trees API](https://docs.github.com/rest/git/trees#get-a-tree).\n- Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download.\n- If the requested file's size is:\n - 1 MB or smaller: All features of this endpoint are supported.\n - Between 1-100 MB: Only the `raw` or `object` custom media types are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty\nstring and the `encoding` field will be `\"none\"`. To get the contents of these larger files, use the `raw` media type.\n - Greater than 100 MB: This endpoint is not supported.", "tags": [ "repos" ], "operationId": "repos/get-content" }, { "server_url": "https://api.github.com", "path": "/search/code", "method": "get", "parameters": [ { "name": "q", "description": "The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching code](https://docs.github.com/search-github/searching-on-github/searching-code)\" for a detailed list of qualifiers.", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "sort", "deprecated": true, "description": "**This field is closing down.** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results)", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "indexed" ] } }, { "name": "order", "description": "**This field is closing down.** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. ", "in": "query", "deprecated": true, "required": false, "schema": { "type": "string", "enum": [ "desc", "asc" ], "default": "desc" } }, { "$ref": "#/components/parameters/per-page", "schema": { "name": "per_page", "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", "in": "query", "schema": { "type": "integer", "default": 30 } } }, { "$ref": "#/components/parameters/page", "schema": { "name": "page", "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", "in": "query", "schema": { "type": "integer", "default": 1 } } } ], "responses": { "200": { "description": "Response", "content": { "application/json": { "schema": { "type": "object", "required": [ "total_count", "incomplete_results", "items" ], "properties": { "total_count": { "type": "integer" }, "incomplete_results": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/code-search-result-item" } } } }, "examples": { "default": { "$ref": "#/components/examples/code-search-result-item-paginated" } } } } }, "304": { "$ref": "#/components/responses/not_modified" }, "503": { "$ref": "#/components/responses/service_unavailable" }, "422": { "$ref": "#/components/responses/validation_failed" }, "403": { "$ref": "#/components/responses/forbidden" } }, "request_body_parameters": {}, "description": "Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).\n\nWhen searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).\n\nFor example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:\n\n`q=addClass+in:file+language:js+repo:jquery/jquery`\n\nThis query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.\n\nConsiderations for code search:\n\nDue to the complexity of searching code, there are a few restrictions on how searches are performed:\n\n* Only the _default branch_ is considered. In most cases, this will be the `master` branch.\n* Only files smaller than 384 KB are searchable.\n* You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing\nlanguage:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.\n\nThis endpoint requires you to authenticate and limits you to 10 requests per minute.", "tags": [ "search" ], "operationId": "search/code" } ], "tools": [] }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agentmode/server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server