> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Presets and context

> Built-in abilities, research presets, file context, and MCP resource connections.

Built-in abilities, research presets, file context, and MCP resource connections. Read the [presets and context guide](/harness/context) for examples, defaults, and behavior.

These declarations cover every public export in this category. Import from `@agentium/harness`. Types such as `ChatMessage`, `RunContext`, and `ExecutionServices` come from [`@agentium/core`](/api-reference/core). A `?` marks an optional field.

## MCPResourceClient

```typescript theme={null}
/** Structural port: both MCP SDK generations can supply a connected Client. */
export interface MCPResourceClient {
    readResource(params: {
        uri: string;
    }, options?: {
        signal?: AbortSignal;
        timeout?: number;
        cacheMode?: "bypass";
    }): Promise<{
        contents: readonly {
            uri: string;
            mimeType?: string;
            text?: string;
            blob?: string;
        }[];
    }>;
}
```

## MCPResourceGrant

```typescript theme={null}
export interface MCPResourceGrant {
    /** Exact server URI, never a local path or a URL fetched by the harness. */
    uri: string;
    /** Explicit text formats. A missing MIME is accepted only when listed as "". */
    mimeTypes: readonly string[];
}
```

## MCPResourcesOptions

```typescript theme={null}
export interface MCPResourcesOptions {
    id: string;
    /** Creates a principal-scoped connection for this binding. Authentication belongs to the host. */
    connect: (ctx: RunContext) => Promise<{
        client: MCPResourceClient;
        dispose?: () => Promise<void>;
    }>;
    /** Bounds setup even when the host connection factory ignores cancellation. Default 5000. */
    connectTimeoutMs?: number;
    resources: readonly MCPResourceGrant[];
    /** Rechecked before reading and before returning content, including on every subsequent fetch. */
    authorize: (grant: MCPResourceGrant, ctx: RunContext) => boolean | Promise<boolean>;
    /** Optional host selector, constrained to the declared grants. No server-wide discovery. */
    select?: (query: string, ctx: RunContext) => readonly string[] | Promise<readonly string[]>;
}
```

## mcpResources

```typescript theme={null}
export declare const mcpResources: Ability<MCPResourcesOptions>;
```

## BaseOptions

```typescript theme={null}
export interface BaseOptions {
    id?: string;
    abilities?: readonly LocalAbilityUse[];
    defaults?: HarnessDefaults;
}
```

## FileContextOptions

```typescript theme={null}
export interface FileContextOptions {
    id: string;
    /** Explicit host grant. Must be absolute; filesystem access begins only during fetch. */
    root: string;
    files: readonly string[];
}
```

## ResearchOptions

```typescript theme={null}
export interface ResearchOptions extends BaseOptions {
    text?: TextContextOptions;
    files?: FileContextOptions;
    tools?: readonly ToolDef[];
}
```

## SuppliedToolsOptions

```typescript theme={null}
export interface SuppliedToolsOptions {
    tools: readonly ToolDef[];
    requirements?: readonly string[];
}
```

## TextContextOptions

```typescript theme={null}
export interface TextContextOptions {
    id: string;
    entries: readonly {
        id: string;
        text: string;
        uri?: string;
    }[];
}
```

## base

```typescript theme={null}
/** Minimal local composition, no background jobs, learning, tools or provider selected implicitly. */
export declare function base(options?: BaseOptions): HarnessDefinition;
```

## fileContext

```typescript theme={null}
export declare const fileContext: Ability<FileContextOptions>;
```

## research

```typescript theme={null}
/** Real context sources plus application-supplied research tools; no connector credentials or implicit web calls. */
export declare function research(options?: ResearchOptions): HarnessDefinition;
```

## suppliedTools

```typescript theme={null}
export declare const suppliedTools: Ability<SuppliedToolsOptions>;
```

## textContext

```typescript theme={null}
export declare const textContext: Ability<TextContextOptions>;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.