kifas.session.assert
kifas.session.assert
Section titled “kifas.session.assert”Run an assertion against the current session state.
Required scopes: session:create
Parameters
Section titled “Parameters”This tool takes no parameters.
Returns
Section titled “Returns”{ "type": "object", "properties": { "passed": { "type": "boolean" }, "reason": { "type": "string" }, "signals": { "type": "object", "properties": { "url_before": { "type": "string" }, "url_after": { "type": "string" }, "scroll_y_before": { "type": "number" }, "scroll_y_after": { "type": "number" }, "settled_ms": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "settled_reason": { "type": "string", "enum": [ "quiet", "steady", "timeout" ] }, "dom_mutation_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "screen_change_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "screen_changed": { "type": "boolean" }, "effect_unverified_reason": { "type": "string" }, "console_errors": { "default": [], "type": "array", "items": { "type": "string" } }, "http_statuses": { "default": [], "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "element_found": { "type": "boolean" }, "check": { "type": "object", "properties": { "kind": { "type": "string" }, "pass": { "type": "boolean" }, "reason": { "type": "string", "maxLength": 2000 }, "cached": { "type": "boolean" }, "unavailable": { "type": "boolean" } }, "required": [ "kind", "pass", "reason" ], "additionalProperties": false } }, "required": [ "settled_ms", "console_errors", "http_statuses" ], "additionalProperties": false } }, "required": [ "passed", "reason" ], "additionalProperties": false}Code samples
Section titled “Code samples”TypeScript (Anthropic MCP SDK)
import { Client } from '@modelcontextprotocol/sdk/client/index.js'import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamable-http.js'
const transport = new StreamableHTTPClientTransport( new URL('https://mcp.kifas.io/'), { requestInit: { headers: { Authorization: `Bearer ${process.env.KIFAS_API_KEY}` }, }, },)const client = new Client({ name: 'demo', version: '0.1.0' })await client.connect(transport)
const result = await client.callTool({ name: 'kifas.session.assert', arguments: {},})console.log(result)Python (httpx, raw JSON-RPC)
import osimport httpx
resp = httpx.post( "https://mcp.kifas.io/", headers={ "Authorization": f"Bearer {os.environ['KIFAS_API_KEY']}", "Content-Type": "application/json", }, json={ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "kifas.session.assert", "arguments": {}, }, },)print(resp.json())curl
curl https://mcp.kifas.io/ \ -H "Authorization: Bearer $KIFAS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "kifas.session.assert", "arguments": {} }}'Raw JSON-RPC body
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "kifas.session.assert", "arguments": {} }}Try it
Section titled “Try it”Want to try kifas.session.assert? Sign in to the dashboard and run it against a real session.