Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
68 lines
1.8 KiB
TypeScript
68 lines
1.8 KiB
TypeScript
"use client";
|
|
|
|
import { useState } from "react";
|
|
import { useCurrentRole } from "@/components/org-team/useCurrentRole";
|
|
import { ToolsHeader } from "./_components/ToolsHeader";
|
|
import { ToolGrid } from "./_components/ToolGrid";
|
|
import { TryItPanel } from "./_components/TryItPanel";
|
|
import { useTools } from "./_components/useTools";
|
|
import { canRunTools, type Tool } from "./_components/types";
|
|
|
|
export default function ToolsPage() {
|
|
const { role, loading: roleLoading } = useCurrentRole();
|
|
const canRun = canRunTools(role);
|
|
|
|
const { tools, loading, error } = useTools();
|
|
const [active, setActive] = useState<Tool | null>(null);
|
|
|
|
return (
|
|
<div>
|
|
<ToolsHeader
|
|
title="Tools"
|
|
subtitle={
|
|
<>
|
|
PaperTrail's verification capabilities exposed as callable tools
|
|
— an MCP-style toolset you can try here or drive from an MCP client
|
|
via the{" "}
|
|
<a
|
|
href="/api/mcp/manifest"
|
|
className="text-accent hover:underline"
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
>
|
|
manifest
|
|
</a>
|
|
.
|
|
</>
|
|
}
|
|
action={{ href: "/console/tools/calls", label: "Call history" }}
|
|
/>
|
|
|
|
<div className="mt-6">
|
|
<ToolGrid
|
|
tools={tools}
|
|
loading={loading}
|
|
error={error}
|
|
canRun={canRun}
|
|
onTry={setActive}
|
|
/>
|
|
</div>
|
|
|
|
{active ? (
|
|
<TryItPanel
|
|
tool={active}
|
|
canRun={canRun}
|
|
onClose={() => setActive(null)}
|
|
/>
|
|
) : null}
|
|
|
|
{!roleLoading && !canRun ? (
|
|
<p className="mt-4 text-xs text-ink/40">
|
|
You can browse tools, but running them requires an editor role or
|
|
higher.
|
|
</p>
|
|
) : null}
|
|
</div>
|
|
);
|
|
}
|