# Publish Content Summary

## User Intent

"How do I generate summaries of documents? Show me content summarization."

## Operation

**SDK Method**: `summarizeContents()`\
**Use Case**: Automatic document summarization with multiple strategies

***

## Code Example (TypeScript)

```typescript
import { Graphlit } from 'graphlit-client';
import { SummarizationTypes } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

// Summarize content by ID
const result = await graphlit.summarizeContents(
  [
    {
      type: SummarizationTypes.Bullets,
      tokens: 500,
      items: 10
    }
  ],
  {
    id: 'content-id'  // Filter to specific content
  }
);

const summary = result.summarizeContents?.[0];
console.log('Summary:', summary?.items?.[0]?.text);
```

***

## Summarization Types

**BULLETS**: Bullet point summary\
**CHAPTERS**: Chapter-by-chapter breakdown\
**HEADLINES**: Key headlines\
**QUESTIONS**: Q\&A format\
**TOPICS**: Topic extraction

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/content/content-publish-summary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
