# ledger_sequence_from_timestamp

Resolve the ledger sequence whose close time is equal to or before the given timestamp (UNIX seconds or RFC 3339). Returns 404 if the time is before the first ledger or in the future.

Agent View of the PolicyLayer registry record for `ledger_sequence_from_timestamp`. HTML page: https://policylayer.com/tools/stellar-expert-mcp/ledger-sequence-from-timestamp

## Facts

- Tool: `ledger_sequence_from_timestamp`
- Server: Stellar Expert (`stellar-expert-mcp`) — https://policylayer.com/tools/stellar-expert-mcp.md
- Install: `npx -y stellar-expert-mcp`
- Homepage: https://www.npmjs.com/package/stellar-expert-mcp
- Risk category: Read (Low risk)
- Registry record: grade A, identity unverified
- Server rate-limited: no
- Parameters: 2 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `network` | string | no | Stellar network. Defaults to STELLAR_EXPERT_NETWORK or public. |
| `timestamp` | string | number | yes | UNIX time (seconds) or RFC 3339 timestamp, e.g. 1642597270 or 2022-08-29T13:51:18Z |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ledger_sequence_from_timestamp",
    "arguments": {
      "timestamp": 0
    }
  }
}
```

## Why ledger_sequence_from_timestamp is rated Low

Even though ledger_sequence_from_timestamp only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

## Use case

AI agents call ledger_sequence_from_timestamp to retrieve information from Stellar Expert without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Stellar Expert:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "ledger_sequence_from_timestamp": {}
  }
}
```

## Other tools on Stellar Expert (11)

- `check_blocked_domain` — Read — https://policylayer.com/tools/stellar-expert-mcp/check-blocked-domain.md
- `get_asset_holder_rank` — Read — https://policylayer.com/tools/stellar-expert-mcp/get-asset-holder-rank.md
- `get_asset_rating` — Read — https://policylayer.com/tools/stellar-expert-mcp/get-asset-rating.md
- `get_asset_supply` — Read — https://policylayer.com/tools/stellar-expert-mcp/get-asset-supply.md
- `get_directory_entry` — Read — https://policylayer.com/tools/stellar-expert-mcp/get-directory-entry.md
- `ledger_timestamp_from_sequence` — Read — https://policylayer.com/tools/stellar-expert-mcp/ledger-timestamp-from-sequence.md
- `list_asset_holders` — Read — https://policylayer.com/tools/stellar-expert-mcp/list-asset-holders.md
- `list_assets` — Read — https://policylayer.com/tools/stellar-expert-mcp/list-assets.md
- `list_blocked_domains` — Read — https://policylayer.com/tools/stellar-expert-mcp/list-blocked-domains.md
- `list_directory_entries` — Read — https://policylayer.com/tools/stellar-expert-mcp/list-directory-entries.md
- `list_directory_tags` — Read — https://policylayer.com/tools/stellar-expert-mcp/list-directory-tags.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=stellar-expert-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/stellar-expert-mcp
