Path: redb-route/redb.Route.Llm/Storage/Redb/Schemas/ToolIdempotencyProps.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Llm/Storage/Redb/Schemas/ToolIdempotencyProps.cs
----
using redb.Core.Attributes;
namespace redb.Route.Llm.Storage.Redb.Schemas;
///
/// Persisted tool-call idempotency record. Distinct from
/// : this row exists for the lifetime of one
/// reservation cycle (reserve → complete → optional release) and answers
/// "did we already run tool_use_id X for conversation C?". The cache, by
/// contrast, is keyed on a content hash and lives on its own TTL.
///
/// Each row carries the composite key "llm-tool:{conv}:{toolUseId}" on
/// the _objects.value_string column (partial index on PostgreSQL/SQLite;
/// no index on MSSQL) and, normalized, in value_unique (per-scheme unique
/// race barrier). Filtering by this scheme id alone narrows the scan to
/// idempotency rows — no mixing with cache rows in WhereRedb queries.
///
///
[RedbScheme("LLM Tool Idempotency")]
public class ToolIdempotencyProps
{
/// Optional tool name for diagnostics / per-tool reports.
public string? ToolName { get; set; }
/// JSON-serialized tool output that was returned for the original call.
public string OutputJson { get; set; } = "{}";
/// When the original tool invocation was confirmed.
public DateTimeOffset CreatedAtUtc { get; set; }
}