# `pypi__get_package_info`

Query comprehensive information about a PyPI package.

This tool retrieves detailed information about a Python package from PyPI,
including metadata, description, author information, dependencies, and more.

Args:
package_name: The name of the PyPI package to query (e.g., 'requests', 'django')

Returns:
Dictionary containing comprehensive package information including:
\- Basic metadata (name, version, summary, description)
\- Author and maintainer information
\- License and project URLs
\- Python version requirements
\- Dependencies and classifiers
\- Version history summary

Raises:
InvalidPackageNameError: If package name is empty or invalid
PackageNotFoundError: If package is not found on PyPI
NetworkError: For network-related errors

- Server: [PyPI](https://gateway.mcpharbor.dev/docs/servers/pypi) (`dev.mcpharbor.gateway/pypi`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/pypi`
- Upstream tool: exposed by the provider; called through this gateway as `pypi__get_package_info`
- Provider terms: <https://policies.python.org/pypi.org/Terms-of-Service/> (verified 2026-09-19)
- Upstream API documentation: <https://docs.pypi.org/api/json/>
- Rate limit: 600 requests per minute

## Parameters

- `package_name` (string, required)

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: pypi__get_package_info
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "package_name": "example"
    },
    "name": "pypi__get_package_info"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider asks for no attribution. Their terms still apply: see the table above.

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "description": "Query comprehensive information about a PyPI package.\n\nThis tool retrieves detailed information about a Python package from PyPI,\nincluding metadata, description, author information, dependencies, and more.\n\nArgs:\n    package_name: The name of the PyPI package to query (e.g., 'requests', 'django')\n\nReturns:\n    Dictionary containing comprehensive package information including:\n    - Basic metadata (name, version, summary, description)\n    - Author and maintainer information\n    - License and project URLs\n    - Python version requirements\n    - Dependencies and classifiers\n    - Version history summary\n\nRaises:\n    InvalidPackageNameError: If package name is empty or invalid\n    PackageNotFoundError: If package is not found on PyPI\n    NetworkError: For network-related errors",
  "inputSchema": {
    "properties": {
      "package_name": {
        "type": "string"
      }
    },
    "required": [
      "package_name"
    ],
    "type": "object"
  },
  "name": "pypi__get_package_info",
  "outputSchema": {
    "additionalProperties": true,
    "type": "object"
  }
}
```
